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

Unified Diff: src/char-predicates.h

Issue 78713002: Experimental lexer generator: generate code for utf-16 character classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Code review (dcarney) 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 | src/lexer/lexer.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/char-predicates.h
diff --git a/src/char-predicates.h b/src/char-predicates.h
index 767ad6513afa7e3d5995a31a1df22372bf7a9484..6e40e77b3bee601240df835d5c8fb0f942cd14d2 100644
--- a/src/char-predicates.h
+++ b/src/char-predicates.h
@@ -66,6 +66,16 @@ struct IdentifierPart {
}
};
+struct IdentifierPartNotLetter {
+ static inline bool Is(uc32 c) {
+ return unibrow::Number::Is(c)
+ || c == 0x200C // U+200C is Zero-Width Non-Joiner.
+ || c == 0x200D // U+200D is Zero-Width Joiner.
+ || unibrow::CombiningMark::Is(c)
+ || unibrow::ConnectorPunctuation::Is(c);
+ }
+};
+
} } // namespace v8::internal
#endif // V8_CHAR_PREDICATES_H_
« no previous file with comments | « no previous file | src/lexer/lexer.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698