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

Side by Side Diff: vm/scanner.h

Issue 9462003: Changes to shrink the token stream representation from two words to one word. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/raw_object_snapshot.cc ('k') | vm/scanner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Scanner class for the Dart language. The scanner reads source text 5 // Scanner class for the Dart language. The scanner reads source text
6 // and produces a stream of tokens which is used by the parser. 6 // and produces a stream of tokens which is used by the parser.
7 // 7 //
8 8
9 #ifndef VM_SCANNER_H_ 9 #ifndef VM_SCANNER_H_
10 #define VM_SCANNER_H_ 10 #define VM_SCANNER_H_
11 11
12 #include "vm/growable_array.h" 12 #include "vm/growable_array.h"
13 #include "vm/token.h" 13 #include "vm/token.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 // Forward declarations. 17 // Forward declarations.
18 class Array;
18 class Library; 19 class Library;
19 class RawString; 20 class RawString;
20 class String; 21 class String;
21 22
22 // A call to Scan() scans the source one token at at time. 23 // A call to Scan() scans the source one token at at time.
23 // The scanned token is returned by cur_token(). 24 // The scanned token is returned by cur_token().
24 // GetStream() scans the entire source text and returns a stream of tokens. 25 // GetStream() scans the entire source text and returns a stream of tokens.
25 class Scanner : ValueObject { 26 class Scanner : ValueObject {
26 public: 27 public:
27 // SourcePosition describes a text location in user friendly 28 // SourcePosition describes a text location in user friendly
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // and its interpolated expressions. 204 // and its interpolated expressions.
204 ScanContext* saved_context_; 205 ScanContext* saved_context_;
205 int32_t string_delimiter_; 206 int32_t string_delimiter_;
206 bool string_is_multiline_; 207 bool string_is_multiline_;
207 int brace_level_; 208 int brace_level_;
208 209
209 const String& private_key_; 210 const String& private_key_;
210 211
211 SourcePosition c0_pos_; // Source position of lookahead character c0_. 212 SourcePosition c0_pos_; // Source position of lookahead character c0_.
212 KeywordTable keywords_[Token::numKeywords]; 213 KeywordTable keywords_[Token::numKeywords];
214 Array& keyword_symbol_table_; // Access to keyword symbols in object store.
213 }; 215 };
214 216
215 217
216 } // namespace dart 218 } // namespace dart
217 219
218 #endif // VM_SCANNER_H_ 220 #endif // VM_SCANNER_H_
OLDNEW
« no previous file with comments | « vm/raw_object_snapshot.cc ('k') | vm/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698