json-glib: update to 1.10.6
[oi-userland.git] / components / developer / jsl / patches / jsl-01-jsl-comment.patch
blob2ff038c227289aa931640e9c7bc11d8e48fbfffb
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
3 @@ -875,7 +875,7 @@
4 * with the syntax for the @...@ control comments and JScript conditional comments. The "jsl:" syntax
5 * is preferred for this reason.
6 */
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' &&
12 @@ -885,6 +885,16 @@
13 SkipChars(ts, 4);
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 */
23 + SkipChars(ts, 5);
24 + jslCC->isAtFormat = JS_FALSE;
25 + }
26 else if (lint->enableLegacyControlComments && MatchChar(ts, '@')) {
27 /* legacy format */
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) == '*')
35 + continue;
37 /* check for nested comments */
38 if (c == '/' && PeekChar(ts) == '*' &&
39 !js_ReportCompileErrorNumber(cx, ts, NULL,