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

Unified Diff: src/char-predicates-inl.h

Issue 13014: Rudimentary assertion expansion (Closed)
Patch Set: Created 12 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 | « src/char-predicates.h ('k') | src/jsregexp.h » ('j') | src/jsregexp.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/char-predicates-inl.h
diff --git a/src/char-predicates-inl.h b/src/char-predicates-inl.h
index b575bdfe58228008f1f728b42ed29aa74c6e51a4..3ef2f91616904f79b577c4c5eb1558b83aff63b3 100644
--- a/src/char-predicates-inl.h
+++ b/src/char-predicates-inl.h
@@ -59,6 +59,25 @@ inline bool IsHexDigit(uc32 c) {
}
+inline bool IsRegExpWord(uc16 c) {
+ return ('a' <= c && c <= 'z')
+ || ('A' <= c && c <= 'Z')
+ || ('0' <= c && c <= '9')
+ || (c == '_');
+}
+
+
+inline bool IsRegExpNewline(uc16 c) {
+ switch (c) {
+ // CR LF LS PS
+ case 0x000A: case 0x000D: case 0x2028: case 0x2029:
+ return false;
+ default:
+ return true;
+ }
+}
+
+
} } // namespace v8::internal
#endif // V8_CHAR_PREDICATES_INL_H_
« no previous file with comments | « src/char-predicates.h ('k') | src/jsregexp.h » ('j') | src/jsregexp.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698