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

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

Issue 10388179: Reject high- and low-surrogates in escaped code points. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: continue scanning after an invalid escaped code point Created 8 years, 7 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') | no next file with comments »
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Read the characters of a string literal. 165 // Read the characters of a string literal.
166 void ScanLiteralStringChars(bool is_raw); 166 void ScanLiteralStringChars(bool is_raw);
167 167
168 // Reads a fixed number of hexadecimal digits. 168 // Reads a fixed number of hexadecimal digits.
169 bool ScanHexDigits(int digits, uint32_t* value); 169 bool ScanHexDigits(int digits, uint32_t* value);
170 170
171 // Reads a variable number of hexadecimal digits. 171 // Reads a variable number of hexadecimal digits.
172 bool ScanHexDigits(int min_digits, int max_digits, uint32_t* value); 172 bool ScanHexDigits(int min_digits, int max_digits, uint32_t* value);
173 173
174 // Reads an escaped code point from within a string literal. 174 // Reads an escaped code point from within a string literal.
175 bool ScanEscapedCodePoint(uint32_t* escaped_char); 175 void ScanEscapedCodePoint(uint32_t* escaped_char);
176 176
177 // Reads identifier. 177 // Reads identifier.
178 RawString* ConsumeIdentChars(bool allow_dollar); 178 RawString* ConsumeIdentChars(bool allow_dollar);
179 void ScanIdentChars(bool allow_dollar); 179 void ScanIdentChars(bool allow_dollar);
180 void ScanIdent() { 180 void ScanIdent() {
181 ScanIdentChars(true); 181 ScanIdentChars(true);
182 } 182 }
183 void ScanIdentNoDollar() { 183 void ScanIdentNoDollar() {
184 ScanIdentChars(false); 184 ScanIdentChars(false);
185 } 185 }
(...skipping 25 matching lines...) Expand all
211 211
212 SourcePosition c0_pos_; // Source position of lookahead character c0_. 212 SourcePosition c0_pos_; // Source position of lookahead character c0_.
213 KeywordTable keywords_[Token::numKeywords]; 213 KeywordTable keywords_[Token::numKeywords];
214 Array& keyword_symbol_table_; // Access to keyword symbols in object store. 214 Array& keyword_symbol_table_; // Access to keyword symbols in object store.
215 }; 215 };
216 216
217 217
218 } // namespace dart 218 } // namespace dart
219 219
220 #endif // VM_SCANNER_H_ 220 #endif // VM_SCANNER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698