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

Unified Diff: runtime/vm/symbols.h

Issue 72923002: Add Dart keyword symbols to the VM isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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: runtime/vm/symbols.h
===================================================================
--- runtime/vm/symbols.h (revision 30276)
+++ runtime/vm/symbols.h (working copy)
@@ -315,6 +315,13 @@
PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_INDEX)
#undef DEFINE_SYMBOL_INDEX
+ kKwTableStart, // First keyword at kKwTableStart + 1.
+
+#define DEFINE_KEYWORD_SYMBOL_INDEX(token, chars, ignore1, ignore2) \
+ token##Id,
+ DART_KEYWORD_LIST(DEFINE_KEYWORD_SYMBOL_INDEX)
+#undef DEFINE_KEYWORD_SYMBOL_INDEX
+
kNullCharId, // One char code symbol starts here and takes up 256 entries.
kMaxPredefinedId = kNullCharId + kMaxOneCharCodeSymbol + 1,
};
@@ -397,6 +404,9 @@
PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR)
#undef DEFINE_SYMBOL_HANDLE_ACCESSOR
+ // Get symbol for scanner keyword.
+ static const String& Keyword(Token::Kind keyword);
+
// Initialize frequently used symbols in the vm isolate.
static void InitOnce(Isolate* isolate);

Powered by Google App Engine
This is Rietveld 408576698