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

Unified Diff: src/scanner.h

Issue 85543002: Experimental lexer generator: utf line terminator fix. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month 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 | tools/lexer_generator/code_generator.py » ('j') | no next file with comments »
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 4a58b1e366b6c3019444897cd111e0c15e2a8567..f6f797e22f1e08dce696b9141fb7d7440195a85d 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -139,6 +139,9 @@ class UnicodeCache {
bool IsIdentifierPart(unibrow::uchar c) { return kIsIdentifierPart.get(c); }
bool IsLineTerminator(unibrow::uchar c) { return kIsLineTerminator.get(c); }
bool IsWhiteSpace(unibrow::uchar c) { return kIsWhiteSpace.get(c); }
+ bool IsWhiteSpaceNotLineTerminator(unibrow::uchar c) {
+ return !kIsLineTerminator.get(c) && kIsWhiteSpace.get(c);
+ }
bool IsLetter(unibrow::uchar c) { return kIsLetter.get(c); }
bool IsIdentifierPartNotLetter(unibrow::uchar c) {
return kIsIdentifierPartNotLetter.get(c);
« no previous file with comments | « no previous file | tools/lexer_generator/code_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698