зеркало из https://github.com/mozilla/gecko-dev.git
Thanks to scole@planetweb.com, no more un-ECMA error for /* in a /**/ comment (110286, r=khanson, sr=brendan).
This commit is contained in:
Родитель
9d6f0a2650
Коммит
9b46da979c
|
@ -211,7 +211,7 @@ MSG_DEF(JSMSG_BAD_PROTOTYPE, 135, 1, JSEXN_TYPEERR, "'prototype' prop
|
|||
MSG_DEF(JSMSG_MISSING_EXPONENT, 136, 0, JSEXN_SYNTAXERR, "missing exponent")
|
||||
MSG_DEF(JSMSG_OUT_OF_MEMORY, 137, 0, JSEXN_ERR, "out of memory")
|
||||
MSG_DEF(JSMSG_UNTERMINATED_STRING, 138, 0, JSEXN_SYNTAXERR, "unterminated string literal")
|
||||
MSG_DEF(JSMSG_NESTED_COMMENT, 139, 0, JSEXN_SYNTAXERR, "nested comment")
|
||||
MSG_DEF(JSMSG_UNUSED0, 139, 0, JSEXN_NONE, "<Error #139 is currently unused>")
|
||||
MSG_DEF(JSMSG_UNTERMINATED_COMMENT, 140, 0, JSEXN_SYNTAXERR, "unterminated comment")
|
||||
MSG_DEF(JSMSG_UNTERMINATED_REGEXP, 141, 0, JSEXN_SYNTAXERR, "unterminated regular expression literal")
|
||||
MSG_DEF(JSMSG_BAD_REGEXP_FLAG, 142, 0, JSEXN_SYNTAXERR, "invalid flag after regular expression")
|
||||
|
|
|
@ -1091,15 +1091,10 @@ skipline:
|
|||
goto retry;
|
||||
}
|
||||
if (MatchChar(ts, '*')) {
|
||||
while ((c = GetChar(ts)) != EOF &&
|
||||
!(c == '*' && MatchChar(ts, '/'))) {
|
||||
if (c == '/' && MatchChar(ts, '*')) {
|
||||
if (MatchChar(ts, '/'))
|
||||
goto retry;
|
||||
js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,
|
||||
JSMSG_NESTED_COMMENT);
|
||||
}
|
||||
}
|
||||
while ((c = GetChar(ts)) != EOF &&
|
||||
!(c == '*' && MatchChar(ts, '/'))) {
|
||||
/* Ignore all characters until comment close. */
|
||||
}
|
||||
if (c == EOF) {
|
||||
js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,
|
||||
JSMSG_UNTERMINATED_COMMENT);
|
||||
|
|
Загрузка…
Ссылка в новой задаче