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

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

Issue 11316031: - Move MathNatives from dart:core to dart:math. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/bootstrap_natives.cc ('k') | runtime/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_
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 static void InitOnce(); 91 static void InitOnce();
92 92
93 // Allocated a private key which is used for name mangling. 93 // Allocated a private key which is used for name mangling.
94 static RawString* AllocatePrivateKey(const Library& library); 94 static RawString* AllocatePrivateKey(const Library& library);
95 95
96 // Return true if str is an identifier. 96 // Return true if str is an identifier.
97 static bool IsIdent(const String& str); 97 static bool IsIdent(const String& str);
98 98
99 // Does the token stream contain a valid literal. This is used to implement
100 // the Dart methods int.parse and double.parse.
101 static bool IsValidLiteral(const Scanner::GrowableTokenStream& tokens,
102 Token::Kind literal_kind,
103 bool* is_positive,
104 String** value);
105
99 private: 106 private:
100 struct ScanContext { 107 struct ScanContext {
101 ScanContext* next; 108 ScanContext* next;
102 char string_delimiter; 109 char string_delimiter;
103 bool string_is_multiline; 110 bool string_is_multiline;
104 int brace_level; 111 int brace_level;
105 }; 112 };
106 113
107 struct KeywordTable { 114 struct KeywordTable {
108 Token::Kind kind; 115 Token::Kind kind;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 223
217 SourcePosition c0_pos_; // Source position of lookahead character c0_. 224 SourcePosition c0_pos_; // Source position of lookahead character c0_.
218 KeywordTable keywords_[Token::numKeywords]; 225 KeywordTable keywords_[Token::numKeywords];
219 Array& keyword_symbol_table_; // Access to keyword symbols in object store. 226 Array& keyword_symbol_table_; // Access to keyword symbols in object store.
220 }; 227 };
221 228
222 229
223 } // namespace dart 230 } // namespace dart
224 231
225 #endif // VM_SCANNER_H_ 232 #endif // VM_SCANNER_H_
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.cc ('k') | runtime/vm/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698