| Index: runtime/vm/token.h
|
| ===================================================================
|
| --- runtime/vm/token.h (revision 3272)
|
| +++ runtime/vm/token.h (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -136,7 +136,7 @@
|
| // to update kFirstKeyword and kLastKeyword below.
|
| #define DART_KEYWORD_LIST(KW) \
|
| KW(kABSTRACT, "abstract", 0, kPseudoKeyword) /* == kFirstKeyword */ \
|
| - KW(kASSERT, "assert", 0, kKeyword) \
|
| + KW(kASSERT, "assert", 0, kPseudoKeyword) \
|
| KW(kBREAK, "break", 0, kKeyword) \
|
| KW(kCASE, "case", 0, kKeyword) \
|
| KW(kCATCH, "catch", 0, kKeyword) \
|
| @@ -171,7 +171,7 @@
|
| KW(kTHROW, "throw", 0, kKeyword) \
|
| KW(kTRUE, "true", 0, kKeyword) \
|
| KW(kTRY, "try", 0, kKeyword) \
|
| - KW(kTYPEDEF, "typedef", 0, kKeyword) \
|
| + KW(kTYPEDEF, "typedef", 0, kPseudoKeyword) \
|
| KW(kVAR, "var", 0, kKeyword) \
|
| KW(kVOID, "void", 0, kKeyword) \
|
| KW(kWHILE, "while", 0, kKeyword) /* == kLastKeyword */
|
| @@ -217,6 +217,10 @@
|
| return (Attributes(tok) & kPseudoKeyword) != 0;
|
| }
|
|
|
| + static bool IsIdentifier(Kind tok) {
|
| + return (tok == kIDENT) || IsPseudoKeyword(tok);
|
| + }
|
| +
|
| static const char* Name(Kind tok) {
|
| ASSERT(tok < kNumTokens);
|
| return name_[tok];
|
|
|