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

Unified Diff: src/dateparser-inl.h

Issue 1287893006: Separate UnicodeCache out into an own file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/dateparser.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/dateparser-inl.h
diff --git a/src/dateparser-inl.h b/src/dateparser-inl.h
index 8973aa0d4ff286b20a8b3c4af57981d0bfa19d69..e0b5cf9c55a4308ea073c74791b091a6db30d3fd 100644
--- a/src/dateparser-inl.h
+++ b/src/dateparser-inl.h
@@ -7,6 +7,7 @@
#include "src/char-predicates-inl.h"
#include "src/dateparser.h"
+#include "src/unicode-cache-inl.h"
namespace v8 {
namespace internal {
@@ -193,6 +194,29 @@ DateParser::DateToken DateParser::DateStringTokenizer<CharType>::Scan() {
template <typename Char>
+bool DateParser::InputReader<Char>::SkipWhiteSpace() {
+ if (unicode_cache_->IsWhiteSpaceOrLineTerminator(ch_)) {
+ Next();
+ return true;
+ }
+ return false;
+}
+
+
+template <typename Char>
+bool DateParser::InputReader<Char>::SkipParentheses() {
+ if (ch_ != '(') return false;
+ int balance = 0;
+ do {
+ if (ch_ == ')') --balance;
+ else if (ch_ == '(') ++balance;
+ Next();
+ } while (balance > 0 && ch_);
+ return true;
+}
+
+
+template <typename Char>
DateParser::DateToken DateParser::ParseES6DateTime(
DateStringTokenizer<Char>* scanner,
DayComposer* day,
« no previous file with comments | « src/dateparser.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698