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

Unified Diff: src/scanner.h

Issue 9490006: Fix illegal escape-sequences to throw syntax errors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/scanner.cc » ('j') | src/scanner.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index 045e7d27a6c647ee963a6c859c47b72548f1edf7..3a15dd8f2fc64951d3fdbdb68c2a3a5ece7153a4 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -520,13 +520,16 @@ class Scanner {
Token::Value ScanIdentifierOrKeyword();
Token::Value ScanIdentifierSuffix(LiteralScope* literal);
- void ScanEscape();
Token::Value ScanString();
+ // Scans an escape-sequence which is part of a string and adds the
+ // decoded character to the current literal. Returns true if a pattern
+ // is scanned.
+ bool ScanEscape();
// Decodes a unicode escape-sequence which is part of an identifier.
// If the escape sequence cannot be decoded the result is kBadChar.
uc32 ScanIdentifierUnicodeEscape();
- // Recognizes a uniocde escape-sequence and adds its characters,
+ // Scans a uniocde escape-sequence and adds its characters,
Erik Corry 2012/04/16 14:16:32 uniocde -> Unicode (not just the capitalization)
Michael Starzinger 2012/04/16 15:44:37 Done.
// uninterpreted, to the current literal. Used for parsing RegExp
// flags.
bool ScanLiteralUnicodeEscape();
« no previous file with comments | « no previous file | src/scanner.cc » ('j') | src/scanner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698