| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 // Is this scanner currently scanning a string interpolation expression. | 160 // Is this scanner currently scanning a string interpolation expression. |
| 161 bool IsNestedContext() const { return saved_context_ != NULL; } | 161 bool IsNestedContext() const { return saved_context_ != NULL; } |
| 162 void PushContext(); | 162 void PushContext(); |
| 163 void PopContext(); | 163 void PopContext(); |
| 164 | 164 |
| 165 // Starts reading a string literal. | 165 // Starts reading a string literal. |
| 166 void ScanLiteralString(bool is_raw); | 166 void ScanLiteralString(bool is_raw); |
| 167 | 167 |
| 168 // Read the characters of a string literal. | 168 // Read the characters of a string literal. |
| 169 void ScanLiteralStringChars(bool is_raw); | 169 void ScanLiteralStringChars(bool is_raw, bool is_first_line); |
| 170 | 170 |
| 171 // Reads a fixed number of hexadecimal digits. | 171 // Reads a fixed number of hexadecimal digits. |
| 172 bool ScanHexDigits(int digits, int32_t* value); | 172 bool ScanHexDigits(int digits, int32_t* value); |
| 173 | 173 |
| 174 // Reads a variable number of hexadecimal digits. | 174 // Reads a variable number of hexadecimal digits. |
| 175 bool ScanHexDigits(int min_digits, int max_digits, int32_t* value); | 175 bool ScanHexDigits(int min_digits, int max_digits, int32_t* value); |
| 176 | 176 |
| 177 // Reads an escaped code point from within a string literal. | 177 // Reads an escaped code point from within a string literal. |
| 178 void ScanEscapedCodePoint(int32_t* escaped_char); | 178 void ScanEscapedCodePoint(int32_t* escaped_char); |
| 179 | 179 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 SourcePosition c0_pos_; // Source position of lookahead character c0_. | 216 SourcePosition c0_pos_; // Source position of lookahead character c0_. |
| 217 KeywordTable keywords_[Token::numKeywords]; | 217 KeywordTable keywords_[Token::numKeywords]; |
| 218 Array& keyword_symbol_table_; // Access to keyword symbols in object store. | 218 Array& keyword_symbol_table_; // Access to keyword symbols in object store. |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 | 221 |
| 222 } // namespace dart | 222 } // namespace dart |
| 223 | 223 |
| 224 #endif // VM_SCANNER_H_ | 224 #endif // VM_SCANNER_H_ |
| OLD | NEW |