archives

« Bugzilla Issues Index

#2791 — Section 11.4 fails to specify the comment forms


Section 11.4 (comments) fails to specify handling and syntax of <!-- and --> comments

<!-- comments act as single line comments, e.g. //
--> comments also act as a single line comment if they're the first non whitespace symbol on a line.

So
SingleLineComment ::
// SingleLineCommentChars{opt}

Should probably become
SingleLineComment ::
// SingleLineCommentCharsopt
<!-- SingleLineCommentCharsopt
LineTerminator --> SingleLineCommentCharsopt


(Changing this bug's 'Product' from 'ECMA-262' to 'Draft for 6th Edition', since section 11.4 is "Comments" only in the 6th edition drafts.)


Actually, this is intended to go into B.1.3

It it really that simple? http://javascript.spec.whatwg.org/#comment-syntax says that

/*
*/ --> xxx

is also a valid single line comment.

Not sure about

/**/ --> xxx




*** This bug has been marked as a duplicate of bug 2610 ***