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

Unified Diff: src/lexer/experimental-scanner.h

Issue 88383003: Experimental parser: rename YYCTYPE (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 | src/lexer/lexer-shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/experimental-scanner.h
diff --git a/src/lexer/experimental-scanner.h b/src/lexer/experimental-scanner.h
index f698f622313752465267dcdd70dfa9713eb6baf8..886da1867b5f4fa0fd40ba72e292e276bc145887 100644
--- a/src/lexer/experimental-scanner.h
+++ b/src/lexer/experimental-scanner.h
@@ -229,7 +229,7 @@ class ScannerBase {
};
-template<typename YYCTYPE>
+template<typename Char>
class ExperimentalScanner : public ScannerBase {
public:
explicit ExperimentalScanner(
@@ -256,7 +256,7 @@ class ExperimentalScanner : public ScannerBase {
// We get a raw pointer from the Handle, but we also update it every time
// there is a GC, so it is safe.
DisallowHeapAllocation no_gc;
- const YYCTYPE* new_buffer = GetNewBufferBasedOnHandle();
+ const Char* new_buffer = GetNewBufferBasedOnHandle();
if (new_buffer != buffer_) {
int start_offset = start_ - buffer_;
int cursor_offset = cursor_ - buffer_;
@@ -269,25 +269,25 @@ class ExperimentalScanner : public ScannerBase {
}
}
- const YYCTYPE* GetNewBufferBasedOnHandle() const;
+ const Char* GetNewBufferBasedOnHandle() const;
private:
Handle<String> source_handle_;
- const YYCTYPE* buffer_;
- const YYCTYPE* buffer_end_;
- const YYCTYPE* start_;
- const YYCTYPE* cursor_;
- const YYCTYPE* marker_;
+ const Char* buffer_;
+ const Char* buffer_end_;
+ const Char* start_;
+ const Char* cursor_;
+ const Char* marker_;
};
-template<typename YYCTYPE>
-uc32 ExperimentalScanner<YYCTYPE>::ScanHexNumber(int length) {
+template<typename Char>
+uc32 ExperimentalScanner<Char>::ScanHexNumber(int length) {
// We have seen \uXXXX, let's see what it is.
// FIXME: we never end up in here if only a subset of the 4 chars are valid
// hex digits -> handle the case where they're not.
uc32 x = 0;
- for (const YYCTYPE* s = cursor_ - length; s != cursor_; ++s) {
+ for (const Char* s = cursor_ - length; s != cursor_; ++s) {
int d = HexValue(*s);
if (d < 0) {
return -1;
« no previous file with comments | « no previous file | src/lexer/lexer-shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698