var passed = true;
try {
    eval("/* mello /* yello */");
    } catch (e) {
        print(e);
        passed = false;
    }
print(passed);

should print "true", not "false".
This commit is contained in:
nboyd%atg.com 2001-10-01 14:25:30 +00:00
parent 3c7580a23b
commit 4ed02f7b8a
2 changed files with 3 additions and 12 deletions

View File

@ -1232,15 +1232,9 @@ public class TokenStream {
return getToken();
}
if (in.match('*')) {
while ((c = in.read()) != -1
&& !(c == '*' && in.match('/'))) {
if (c == '\n') {
} else if (c == '/' && in.match('*')) {
if (in.match('/'))
return getToken();
reportSyntaxError("msg.nested.comment", null);
return ERROR;
}
while ((c = in.read()) != -1 &&
!(c == '*' && in.match('/'))) {
; // empty loop body
}
if (c == EOF_CHAR) {
reportSyntaxError("msg.unterminated.comment", null);

View File

@ -434,9 +434,6 @@ msg.unterminated.string.lit =\
msg.oct.esc.too.large =\
octal escape too large
msg.nested.comment =\
nested comment
msg.unterminated.comment =\
unterminated comment