| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 void EndStringLiteral(); | 158 void EndStringLiteral(); |
| 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. Remove whitespace up to |
| 169 void ScanLiteralStringChars(bool is_raw); | 169 // and including the first newline character if remove_whitespace |
| 170 // is true. |
| 171 void ScanLiteralStringChars(bool is_raw, bool remove_whitespace); |
| 170 | 172 |
| 171 // Reads a fixed number of hexadecimal digits. | 173 // Reads a fixed number of hexadecimal digits. |
| 172 bool ScanHexDigits(int digits, int32_t* value); | 174 bool ScanHexDigits(int digits, int32_t* value); |
| 173 | 175 |
| 174 // Reads a variable number of hexadecimal digits. | 176 // Reads a variable number of hexadecimal digits. |
| 175 bool ScanHexDigits(int min_digits, int max_digits, int32_t* value); | 177 bool ScanHexDigits(int min_digits, int max_digits, int32_t* value); |
| 176 | 178 |
| 177 // Reads an escaped code point from within a string literal. | 179 // Reads an escaped code point from within a string literal. |
| 178 void ScanEscapedCodePoint(int32_t* escaped_char); | 180 void ScanEscapedCodePoint(int32_t* escaped_char); |
| 179 | 181 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 217 |
| 216 SourcePosition c0_pos_; // Source position of lookahead character c0_. | 218 SourcePosition c0_pos_; // Source position of lookahead character c0_. |
| 217 KeywordTable keywords_[Token::numKeywords]; | 219 KeywordTable keywords_[Token::numKeywords]; |
| 218 Array& keyword_symbol_table_; // Access to keyword symbols in object store. | 220 Array& keyword_symbol_table_; // Access to keyword symbols in object store. |
| 219 }; | 221 }; |
| 220 | 222 |
| 221 | 223 |
| 222 } // namespace dart | 224 } // namespace dart |
| 223 | 225 |
| 224 #endif // VM_SCANNER_H_ | 226 #endif // VM_SCANNER_H_ |
| OLD | NEW |