Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: frog/scripts/tokenizer_gen.py

Issue 8585044: Fixes issues in string interpolation tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: remove debugging code Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: frog/scripts/tokenizer_gen.py
diff --git a/frog/scripts/tokenizer_gen.py b/frog/scripts/tokenizer_gen.py
index ec1f5b522928345b87e1a1d5061773cff534ddd8..63ae9dff1c91949e56d2898b5c57ef92e4116505 100755
--- a/frog/scripts/tokenizer_gen.py
+++ b/frog/scripts/tokenizer_gen.py
@@ -70,7 +70,7 @@ class Case:
if self.includeWhitespace:
cw.enterBlock('default:')
cw.enterBlock('if (isIdentifierStart(ch)) {')
- cw.writeln('return this.finishIdentifier();')
+ cw.writeln('return this.finishIdentifier(ch);')
cw.exitBlock('} else if (isDigit(ch)) {')
cw.enterBlock()
cw.writeln('return this.finishNumber();')
@@ -244,7 +244,13 @@ def writeHelperMethods(cw):
writeClass(cw, 'Whitespace', OrTest(
CharTest(' '), CharTest('\t'), CharTest('\n'), CharTest('\r')))
writeClass(cw, 'IdentifierPart', OrTest(
- ExplicitTest('isIdentifierStart(c)'), ExplicitTest('isDigit(c)')))
+ ExplicitTest('isIdentifierStart(c)'),
+ ExplicitTest('isDigit(c)'),
+ CharTest('$')))
+ # This is like IdentifierPart, but without $
+ writeClass(cw, 'InterpIdentifierPart', OrTest(
+ ExplicitTest('isIdentifierStart(c)'),
+ ExplicitTest('isDigit(c)')))
def writeExtraMethods(cw):
lengths = {}

Powered by Google App Engine
This is Rietveld 408576698