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

Unified Diff: runtime/vm/token.cc

Issue 1589643002: Source positions for constructors and lots of async machinery (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « runtime/vm/token.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/token.cc
diff --git a/runtime/vm/token.cc b/runtime/vm/token.cc
index 75872e5d1077087923eb9636641cb6bfbac30f96..504b6d90a81bd40c4587503f83096ba6bbc322d5 100644
--- a/runtime/vm/token.cc
+++ b/runtime/vm/token.cc
@@ -78,4 +78,21 @@ bool Token::IsUnaryArithmeticOperator(Token::Kind token) {
}
+const char* ClassifyingTokenPositions::ToCString(intptr_t token_pos) {
+ ASSERT(token_pos < Token::kMinSourcePos);
+ COMPILE_ASSERT(ClassifyingTokenPositions::kPrivate ==
+ (Token::kNoSourcePos - 1));
+ COMPILE_ASSERT(kLast < kPrivate);
+ switch (token_pos) {
+ case Token::kNoSourcePos: return "NoSource";
+#define DEFINE_CASE(name, value) \
+ case value: return #name;
+ CLASSIFYING_TOKEN_POSITIONS(DEFINE_CASE);
+#undef DEFINE_CASE
+ default:
+ UNIMPLEMENTED();
+ return NULL;
+ }
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/token.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698