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

Unified Diff: runtime/vm/scanner.h

Issue 36323003: - Ensure that the token stream from generated source matches the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
Index: runtime/vm/scanner.h
===================================================================
--- runtime/vm/scanner.h (revision 28974)
+++ runtime/vm/scanner.h (working copy)
@@ -37,9 +37,8 @@
struct TokenDescriptor {
Token::Kind kind;
int offset; // Offset in source string.
- int length; // Length of token in source.
SourcePosition position; // Text position in source.
- String* literal; // Identifier, number or string literal.
+ const String* literal; // Identifier, number or string literal.
};
// Dummy token index reflecting an unknown source position.
@@ -92,7 +91,7 @@
static bool IsValidLiteral(const Scanner::GrowableTokenStream& tokens,
Token::Kind literal_kind,
bool* is_positive,
- String** value);
+ const String** value);
private:
struct ScanContext {
@@ -197,14 +196,15 @@
TokenDescriptor current_token_; // Current token.
TokenDescriptor newline_token_; // Newline token.
+ TokenDescriptor empty_string_token_; // Token for "".
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
- // within source_.
- 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.
+ intptr_t source_length_; // The length of the source text.
+ intptr_t lookahead_pos_; // Position of lookahead character
+ // within source_.
+ 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') | runtime/vm/scanner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698