1 --- jsl-0.3.0/src/jsscan.c.orig Wed Oct 25 20:41:48 2006
2 +++ jsl-0.3.0/src/jsscan.c Thu Oct 11 16:45:39 2012
4 * with the syntax for the @...@ control comments and JScript conditional comments. The "jsl:" syntax
5 * is preferred for this reason.
7 - jschar controlCommentPrefix[4];
8 + jschar controlCommentPrefix[5];
9 if (PeekChars(ts, 4, controlCommentPrefix) &&
10 JS_TOLOWER(controlCommentPrefix[0]) == 'j' &&
11 JS_TOLOWER(controlCommentPrefix[1]) == 's' &&
14 jslCC->isAtFormat = JS_FALSE;
16 + else if (PeekChars(ts, 5, controlCommentPrefix) &&
17 + JS_TOLOWER(controlCommentPrefix[0]) == ' ' &&
18 + JS_TOLOWER(controlCommentPrefix[1]) == 'j' &&
19 + JS_TOLOWER(controlCommentPrefix[2]) == 's' &&
20 + JS_TOLOWER(controlCommentPrefix[3]) == 'l' &&
21 + JS_TOLOWER(controlCommentPrefix[4]) == ':') {
22 + /* pre-spaced jsl format */
24 + jslCC->isAtFormat = JS_FALSE;
26 else if (lint->enableLegacyControlComments && MatchChar(ts, '@')) {
28 jslCC->isAtFormat = JS_TRUE;
29 @@ -1561,6 +1571,10 @@
30 while ((c = GetChar(ts)) != EOF &&
31 !(c == '*' && MatchChar(ts, '/'))) {
33 + /* allow for spaces around jsl: declarations */
34 + if (c == ' ' && PeekChar(ts) == '*')
37 /* check for nested comments */
38 if (c == '/' && PeekChar(ts) == '*' &&
39 !js_ReportCompileErrorNumber(cx, ts, NULL,