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

Unified Diff: compiler/java/com/google/dart/compiler/parser/Token.java

Issue 11549028: Issue 6971. Fixes for using built-in identifier as import prefix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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: compiler/java/com/google/dart/compiler/parser/Token.java
diff --git a/compiler/java/com/google/dart/compiler/parser/Token.java b/compiler/java/com/google/dart/compiler/parser/Token.java
index 59b754eca19213a9d024589e1cd4da9549f74da3..74e211d85255ec6c6544954f07bec11d51e6957d 100644
--- a/compiler/java/com/google/dart/compiler/parser/Token.java
+++ b/compiler/java/com/google/dart/compiler/parser/Token.java
@@ -179,6 +179,9 @@ public enum Token {
*/
public static Token lookup(String syntax) {
Token token = tokens.get(syntax);
+ if ("as".equals(syntax)) {
+ return IDENTIFIER;
+ }
if (token == null) {
return IDENTIFIER;
}

Powered by Google App Engine
This is Rietveld 408576698