Changeset 86554 in webkit
- Timestamp:
- May 16, 2011 3:51:09 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86551 r86554 1 2011-05-16 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Fix SourceJavaScriptTokenizer keyword parsing 6 https://bugs.webkit.org/show_bug.cgi?id=60773 7 8 * inspector/syntax-highlight-javascript-expected.txt: 9 * inspector/syntax-highlight-javascript.html: 10 1 11 2011-05-16 Robert Hogan <robert@webkit.org> 2 12 -
trunk/LayoutTests/inspector/syntax-highlight-javascript-expected.txt
r60562 r86554 16 16 / 17 17 */foo: webkit-javascript-ident,webkit-javascript-comment,,webkit-javascript-comment,,webkit-javascript-comment,webkit-javascript-ident 18 {0: true}: *,webkit-javascript-number,*,webkit-javascript-keyword,* 19 var toString;: webkit-javascript-keyword,*,webkit-javascript-ident,* 18 20 -
trunk/LayoutTests/inspector/syntax-highlight-javascript.html
r78535 r86554 23 23 dumpSyntaxHighlightJS("'/\\\n/';"); 24 24 dumpSyntaxHighlightJS("foo/**\n/\n*/foo"); 25 dumpSyntaxHighlightJS("{0: true}"); 26 dumpSyntaxHighlightJS("var toString;"); 25 27 26 28 InspectorTest.completeTest(); -
trunk/Source/WebCore/ChangeLog
r86553 r86554 1 2011-05-16 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Fix SourceJavaScriptTokenizer keyword parsing 6 https://bugs.webkit.org/show_bug.cgi?id=60773 7 8 * inspector/front-end/SourceJavaScriptTokenizer.js: 9 (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken): 10 * inspector/front-end/SourceJavaScriptTokenizer.re2js: 11 1 12 2011-05-16 Nikolas Zimmermann <nzimmermann@rim.com> 2 13 -
trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js
r86430 r86554 1 /* Generated by re2c 0.13.5 on Fri May 6 13:56:13 2011 */1 /* Generated by re2c 0.13.5 on Fri May 13 20:01:13 2011 */ 2 2 /* 3 3 * Copyright (C) 2009 Google Inc. All rights reserved. … … 39 39 // | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \ 40 40 // | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \ 41 // | sed 's|yych <= \(0x[0-9a-fA-f]+\)|yych <= String.fromCharCode(\1)|' \ 41 42 // | sed 's|unsigned\ int|var|' \ 42 43 // | sed 's|var\ yych|case 1: case 1: var yych|' … … 252 253 { 253 254 var token = this._line.substring(cursorOnEnter, cursor); 254 if (t oken in this._keywords)255 if (this._keywords[token] === true && token !== "__proto__") 255 256 this.tokenType = "javascript-keyword"; 256 257 else … … 456 457 if (yych <= '`') { gotoCase = 21; continue; }; 457 458 if (yych <= 'z') { gotoCase = 49; continue; }; 458 if (yych <= 0x7F) { gotoCase = 21; continue; };459 if (yych <= String.fromCharCode(0x7F)) { gotoCase = 21; continue; }; 459 460 { gotoCase = 49; continue; }; 460 461 } … … 1184 1185 { 1185 1186 var token = this._line.substring(cursorOnEnter, cursor); 1186 if (t oken in this._keywords)1187 if (this._keywords[token] === true && token !== "__proto__") 1187 1188 this.tokenType = "javascript-keyword"; 1188 1189 else … … 1401 1402 if (yych <= '`') { gotoCase = 142; continue; }; 1402 1403 if (yych <= 'z') { gotoCase = 169; continue; }; 1403 if (yych <= 0x7F) { gotoCase = 142; continue; };1404 if (yych <= String.fromCharCode(0x7F)) { gotoCase = 142; continue; }; 1404 1405 { gotoCase = 169; continue; }; 1405 1406 } -
trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js
r86430 r86554 31 31 // Generate js file as follows: 32 32 // 33 // re2c -isc WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js \33 // re2c -isc Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js \ 34 34 // | sed 's|^yy\([^:]*\)*\:|case \1:|' \ 35 35 // | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \ … … 38 38 // | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \ 39 39 // | sed 's|goto case \([^;]*\)|{ gotoCase = \1; continue; }|' \ 40 // | sed 's|yych <= \(0x[0-9a-fA-f]*\)|yych <= String.fromCharCode(\1)|' \ 40 41 // | sed 's|unsigned\ int|var|' \ 41 42 // | sed 's|var\ yych|case 1: var yych|' … … 165 166 { 166 167 var token = this._line.substring(cursorOnEnter, cursor); 167 if (t oken in this._keywords)168 if (this._keywords[token] === true && token !== "__proto__") 168 169 this.tokenType = "javascript-keyword"; 169 170 else
Note: See TracChangeset
for help on using the changeset viewer.