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

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

Issue 9264051: Fix for bug 1229: Unary operator plus is not allowed ... except for literals. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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/parser.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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 void ErrorMsg(const char* msg); 125 void ErrorMsg(const char* msg);
126 126
127 // Scans entire source into a given stream of tokens. 127 // Scans entire source into a given stream of tokens.
128 void ScanAll(GrowableTokenStream* token_stream); 128 void ScanAll(GrowableTokenStream* token_stream);
129 129
130 // These functions return true if the given character is a letter, 130 // These functions return true if the given character is a letter,
131 // a decimal digit, a hexadecimal digit, etc. 131 // a decimal digit, a hexadecimal digit, etc.
132 static bool IsLetter(int32_t c); 132 static bool IsLetter(int32_t c);
133 static bool IsDecimalDigit(int32_t c); 133 static bool IsDecimalDigit(int32_t c);
134 static bool IsNumberStart(int32_t);
134 static bool IsHexDigit(int32_t c); 135 static bool IsHexDigit(int32_t c);
135 static bool IsIdentStartChar(int32_t c); 136 static bool IsIdentStartChar(int32_t c);
136 static bool IsIdentChar(int32_t c); 137 static bool IsIdentChar(int32_t c);
137 138
138 // Skips up to next non-whitespace character. 139 // Skips up to next non-whitespace character.
139 void ConsumeWhiteSpace(); 140 void ConsumeWhiteSpace();
140 141
141 // Skips characters up to end of line. 142 // Skips characters up to end of line.
142 void ConsumeLineComment(); 143 void ConsumeLineComment();
143 144
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 const String& private_key_; 206 const String& private_key_;
206 207
207 SourcePosition c0_pos_; // Source position of lookahead character c0_. 208 SourcePosition c0_pos_; // Source position of lookahead character c0_.
208 KeywordTable keywords_[Token::numKeywords]; 209 KeywordTable keywords_[Token::numKeywords];
209 }; 210 };
210 211
211 212
212 } // namespace dart 213 } // namespace dart
213 214
214 #endif // VM_SCANNER_H_ 215 #endif // VM_SCANNER_H_
OLDNEW
« 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