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

Side by Side Diff: runtime/vm/scanner.h

Issue 144343002: Rename kDummyTokenIndex to kNoSourcePos (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | « runtime/vm/runtime_entry_test.cc ('k') | runtime/vm/scopes_test.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_
(...skipping 24 matching lines...) Expand all
35 // TokenDesc defines the kind of a token and its location in 35 // TokenDesc defines the kind of a token and its location in
36 // the source text. 36 // the source text.
37 struct TokenDescriptor { 37 struct TokenDescriptor {
38 Token::Kind kind; 38 Token::Kind kind;
39 int offset; // Offset in source string. 39 int offset; // Offset in source string.
40 SourcePosition position; // Text position in source. 40 SourcePosition position; // Text position in source.
41 const String* literal; // Identifier, number or string literal. 41 const String* literal; // Identifier, number or string literal.
42 }; 42 };
43 43
44 // Dummy token index reflecting an unknown source position. 44 // Dummy token index reflecting an unknown source position.
45 static const intptr_t kDummyTokenIndex = 0; 45 static const intptr_t kNoSourcePos = 0;
46 46
47 // Character used to indicate a private identifier. 47 // Character used to indicate a private identifier.
48 static const char kPrivateIdentifierStart = '_'; 48 static const char kPrivateIdentifierStart = '_';
49 49
50 // Character used to separate the private identifier from the key. 50 // Character used to separate the private identifier from the key.
51 static const char kPrivateKeySeparator = '@'; 51 static const char kPrivateKeySeparator = '@';
52 52
53 typedef ZoneGrowableArray<TokenDescriptor> GrowableTokenStream; 53 typedef ZoneGrowableArray<TokenDescriptor> GrowableTokenStream;
54 54
55 // Initializes scanner to scan string source. 55 // Initializes scanner to scan string source.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 SourcePosition c0_pos_; // Source position of lookahead character c0_. 215 SourcePosition c0_pos_; // Source position of lookahead character c0_.
216 216
217 static KeywordTable keywords_[Token::numKeywords]; 217 static KeywordTable keywords_[Token::numKeywords];
218 }; 218 };
219 219
220 220
221 } // namespace dart 221 } // namespace dart
222 222
223 #endif // VM_SCANNER_H_ 223 #endif // VM_SCANNER_H_
OLDNEW
« no previous file with comments | « runtime/vm/runtime_entry_test.cc ('k') | runtime/vm/scopes_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698