Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Side by Side Diff: runtime/vm/scanner.h

Issue 24493007: Discard first line of multiline string if only whitespace (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/scanner.cc » ('j') | runtime/vm/scanner.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/scanner.cc » ('j') | runtime/vm/scanner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698