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

Unified Diff: frog/scripts/token_kind_gen.py

Issue 8763001: Fix names with '$' to not conflict with operators or internal helpers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged again 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
« no previous file with comments | « frog/scripts/token_info.py ('k') | frog/token_kind.g.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/scripts/token_kind_gen.py
diff --git a/frog/scripts/token_kind_gen.py b/frog/scripts/token_kind_gen.py
index 5824ed05eb74198d1967f83a78da0136a23c2cbc..69fe6be8da313ccaa70d790e0a18c1a0733aa0d4 100644
--- a/frog/scripts/token_kind_gen.py
+++ b/frog/scripts/token_kind_gen.py
@@ -60,9 +60,8 @@ def main():
cw.enterBlock('switch(name) {')
for tok in tokens:
if tok.methodName is not None:
- dname = repr(tok.methodName).replace('$', '\\$')
- cw.writeln('case %s: return %s;' % (dname, repr(tok.text)))
- cw.writeln("case '\\$ne': return '!=';");
+ cw.writeln('case %r: return %r;' % (tok.methodName, tok.text))
+ cw.writeln("case ':ne': return '!=';");
cw.exitBlock('}')
cw.exitBlock('}')
« no previous file with comments | « frog/scripts/token_info.py ('k') | frog/token_kind.g.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698