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

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

Issue 19300002: ES6: Add support for explicit octal and binary integer literals (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix long lines Created 7 years, 5 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 | « src/char-predicates.h ('k') | src/conversions.h » ('j') | no next file with comments »
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 1a89ef3b11bca76b34c84ae563e0d9adda64ca22..dee9ccd3815e78897d98995ca11ad5c15c76f0b9 100644
--- a/src/char-predicates-inl.h
+++ b/src/char-predicates-inl.h
@@ -71,6 +71,18 @@ inline bool IsHexDigit(uc32 c) {
}
+inline bool IsOctalDigit(uc32 c) {
+ // ECMA-262, 6th, 7.8.3
+ return IsInRange(c, '0', '7');
+}
+
+
+inline bool IsBinaryDigit(uc32 c) {
+ // ECMA-262, 6th, 7.8.3
+ return c == '0' || c == '1';
+}
+
+
inline bool IsRegExpWord(uc16 c) {
return IsInRange(AsciiAlphaToLower(c), 'a', 'z')
|| IsDecimalDigit(c)
« no previous file with comments | « src/char-predicates.h ('k') | src/conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698