| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Scanner class for the Dart language. The scanner reads source text | 5 // Scanner class for the Dart language. The scanner reads source text |
| 6 // and produces a stream of tokens which is used by the parser. | 6 // and produces a stream of tokens which is used by the parser. |
| 7 // | 7 // |
| 8 | 8 |
| 9 #ifndef VM_SCANNER_H_ | 9 #ifndef VM_SCANNER_H_ |
| 10 #define VM_SCANNER_H_ | 10 #define VM_SCANNER_H_ |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 ScanContext* next; | 95 ScanContext* next; |
| 96 char string_delimiter; | 96 char string_delimiter; |
| 97 bool string_is_multiline; | 97 bool string_is_multiline; |
| 98 int brace_level; | 98 int brace_level; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 struct KeywordTable { | 101 struct KeywordTable { |
| 102 Token::Kind kind; | 102 Token::Kind kind; |
| 103 const char* keyword_chars; | 103 const char* keyword_chars; |
| 104 int keyword_len; | 104 int keyword_len; |
| 105 String* keyword_symbol; | |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 // Rewind scanner position to token 0. | 107 // Rewind scanner position to token 0. |
| 109 void Reset(); | 108 void Reset(); |
| 110 | 109 |
| 111 // Initialize Scanner tables. | 110 // Initialize Scanner tables. |
| 112 void InitKeywordTable(); | 111 void InitKeywordTable(); |
| 113 | 112 |
| 114 // Reads next lookahead character. | 113 // Reads next lookahead character. |
| 115 void ReadChar(); | 114 void ReadChar(); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 const String& private_key_; | 208 const String& private_key_; |
| 210 | 209 |
| 211 SourcePosition c0_pos_; // Source position of lookahead character c0_. | 210 SourcePosition c0_pos_; // Source position of lookahead character c0_. |
| 212 KeywordTable keywords_[Token::numKeywords]; | 211 KeywordTable keywords_[Token::numKeywords]; |
| 213 }; | 212 }; |
| 214 | 213 |
| 215 | 214 |
| 216 } // namespace dart | 215 } // namespace dart |
| 217 | 216 |
| 218 #endif // VM_SCANNER_H_ | 217 #endif // VM_SCANNER_H_ |
| OLD | NEW |