| Index: runtime/vm/scanner.h
|
| ===================================================================
|
| --- runtime/vm/scanner.h (revision 37049)
|
| +++ runtime/vm/scanner.h (working copy)
|
| @@ -25,6 +25,8 @@
|
| // GetStream() scans the entire source text and returns a stream of tokens.
|
| class Scanner : ValueObject {
|
| public:
|
| + typedef int32_t (*CharAtFunc)(const String& str, intptr_t index);
|
| +
|
| // SourcePosition describes a text location in user friendly
|
| // terms of line number and column.
|
| struct SourcePosition {
|
| @@ -75,7 +77,7 @@
|
| static void InitOnce();
|
|
|
| // Return true if str is an identifier.
|
| - static bool IsIdent(const String& str);
|
| + bool IsIdent(const String& str);
|
|
|
| // Does the token stream contain a valid literal. This is used to implement
|
| // the Dart methods int.parse and double.parse.
|
| @@ -182,6 +184,8 @@
|
|
|
| void ScanScriptTag();
|
|
|
| + CharAtFunc CallCharAt() const { return char_at_func_; }
|
| +
|
| static void PrintTokens(const GrowableTokenStream& ts);
|
|
|
| TokenDescriptor current_token_; // Current token.
|
| @@ -207,6 +211,8 @@
|
|
|
| SourcePosition c0_pos_; // Source position of lookahead character c0_.
|
|
|
| + const CharAtFunc char_at_func_;
|
| +
|
| static KeywordTable keywords_[Token::kNumKeywords];
|
| static int keywords_char_offset_[kNumLowercaseChars];
|
| };
|
|
|