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

Unified Diff: lib/src/js/keywords.dart

Issue 998043002: Fixes in codegen and test script (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months 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 | « lib/src/js/js_ast.dart ('k') | lib/src/js/printer.dart » ('j') | test/test.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/js/keywords.dart
diff --git a/lib/src/js/keywords.dart b/lib/src/js/keywords.dart
new file mode 100644
index 0000000000000000000000000000000000000000..0f497b464adf5554b833978c06a8159ed9606f71
--- /dev/null
+++ b/lib/src/js/keywords.dart
@@ -0,0 +1,44 @@
+library js_keywords;
+
+bool isJsKeyword(String keyword) {
+ switch (keyword) {
+ case "break":
+ case "case":
+ case "catch":
+ case "class":
+ case "const":
+ case "continue":
+ case "debugger":
+ case "default":
+ case "delete":
+ case "do":
+ case "else":
+ case "export":
+ case "extends":
+ case "finally":
+ case "for":
+ case "function":
+ case "if":
+ case "import":
+ case "in":
+ case "instanceof":
+ case "let":
+ case "new":
+ case "return":
+ case "static":
+ case "super":
+ case "switch":
+ case "this":
+ case "throw":
+ case "try":
+ case "typeof":
+ case "var":
+ case "void":
+ case "while":
+ case "with":
+ case "yield":
+ return true;
+ }
+ return false;
+}
+
« no previous file with comments | « lib/src/js/js_ast.dart ('k') | lib/src/js/printer.dart » ('j') | test/test.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698