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

Unified Diff: runtime/vm/scanner.h

Issue 23452043: Introduce newline tokens into the token stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase (fingerprints) Created 7 years, 3 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 | « runtime/vm/parser.cc ('k') | runtime/vm/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scanner.h
diff --git a/runtime/vm/scanner.h b/runtime/vm/scanner.h
index 316ac98339e475cbda70bc57a0f8960df29d3f81..5d59dee190cc7da32621cba5ecc1976f5fbed032 100644
--- a/runtime/vm/scanner.h
+++ b/runtime/vm/scanner.h
@@ -203,6 +203,7 @@ class Scanner : ValueObject {
static void PrintTokens(const GrowableTokenStream& ts);
TokenDescriptor current_token_; // Current token.
+ TokenDescriptor newline_token_; // Newline token.
const String& source_; // The source text being tokenized.
intptr_t source_length_; // The length of the source text.
intptr_t lookahead_pos_; // Position of lookahead character
@@ -210,6 +211,7 @@ class Scanner : ValueObject {
intptr_t token_start_; // Begin of current token in src_.
int32_t c0_; // Lookahead character.
bool newline_seen_; // Newline before current token.
+ intptr_t prev_token_line_; // Line number of the previous token.
// The following fields keep track whether we are scanning a string literal
// and its interpolated expressions.
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698