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

Side by Side Diff: lib/compiler/implementation/scanner/token.dart

Issue 9958009: Implement cascaded calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 8 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
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 final int EOF_TOKEN = 0; 5 final int EOF_TOKEN = 0;
6 6
7 final int KEYWORD_TOKEN = $k; 7 final int KEYWORD_TOKEN = $k;
8 final int IDENTIFIER_TOKEN = $a; 8 final int IDENTIFIER_TOKEN = $a;
9 final int DOUBLE_TOKEN = $d; 9 final int DOUBLE_TOKEN = $d;
10 final int INT_TOKEN = $i; 10 final int INT_TOKEN = $i;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // TODO(ahe): The following are not tokens in Dart. 242 // TODO(ahe): The following are not tokens in Dart.
243 final PrecedenceInfo BACKPING_INFO = 243 final PrecedenceInfo BACKPING_INFO =
244 const PrecedenceInfo(const SourceString('`'), 0, BACKPING_TOKEN); 244 const PrecedenceInfo(const SourceString('`'), 0, BACKPING_TOKEN);
245 final PrecedenceInfo BACKSLASH_INFO = 245 final PrecedenceInfo BACKSLASH_INFO =
246 const PrecedenceInfo(const SourceString('\\'), 0, BACKSLASH_TOKEN); 246 const PrecedenceInfo(const SourceString('\\'), 0, BACKSLASH_TOKEN);
247 final PrecedenceInfo PERIOD_PERIOD_PERIOD_INFO = 247 final PrecedenceInfo PERIOD_PERIOD_PERIOD_INFO =
248 const PrecedenceInfo(const SourceString('...'), 0, 248 const PrecedenceInfo(const SourceString('...'), 0,
249 PERIOD_PERIOD_PERIOD_TOKEN); 249 PERIOD_PERIOD_PERIOD_TOKEN);
250 250
251 // TODO(ahe): This might become a token. 251 /**
252 * The cascade operator has the lowest precedence of any operator.
253 */
254 final int CASCADE_PRECEDENCE = 1;
252 final PrecedenceInfo PERIOD_PERIOD_INFO = 255 final PrecedenceInfo PERIOD_PERIOD_INFO =
253 const PrecedenceInfo(const SourceString('..'), 0, PERIOD_PERIOD_TOKEN); 256 const PrecedenceInfo(const SourceString('..'), CASCADE_PRECEDENCE,
257 PERIOD_PERIOD_TOKEN);
254 258
255 final PrecedenceInfo BANG_INFO = 259 final PrecedenceInfo BANG_INFO =
256 const PrecedenceInfo(const SourceString('!'), 0, BANG_TOKEN); 260 const PrecedenceInfo(const SourceString('!'), 0, BANG_TOKEN);
257 final PrecedenceInfo COLON_INFO = 261 final PrecedenceInfo COLON_INFO =
258 const PrecedenceInfo(const SourceString(':'), 0, COLON_TOKEN); 262 const PrecedenceInfo(const SourceString(':'), 0, COLON_TOKEN);
259 final PrecedenceInfo INDEX_INFO = 263 final PrecedenceInfo INDEX_INFO =
260 const PrecedenceInfo(const SourceString('[]'), 0, INDEX_TOKEN); 264 const PrecedenceInfo(const SourceString('[]'), 0, INDEX_TOKEN);
261 final PrecedenceInfo MINUS_MINUS_INFO = 265 final PrecedenceInfo MINUS_MINUS_INFO =
262 const PrecedenceInfo(const SourceString('--'), POSTFIX_PRECEDENCE, 266 const PrecedenceInfo(const SourceString('--'), POSTFIX_PRECEDENCE,
263 MINUS_MINUS_TOKEN); 267 MINUS_MINUS_TOKEN);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 433
430 final PrecedenceInfo STRING_INTERPOLATION_INFO = 434 final PrecedenceInfo STRING_INTERPOLATION_INFO =
431 const PrecedenceInfo(const SourceString('\${'), 0, 435 const PrecedenceInfo(const SourceString('\${'), 0,
432 STRING_INTERPOLATION_TOKEN); 436 STRING_INTERPOLATION_TOKEN);
433 437
434 final PrecedenceInfo HEXADECIMAL_INFO = 438 final PrecedenceInfo HEXADECIMAL_INFO =
435 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); 439 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN);
436 440
437 // For reporting lexical errors. 441 // For reporting lexical errors.
438 final PrecedenceInfo ERROR_INFO = 442 final PrecedenceInfo ERROR_INFO =
439 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); 443 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN);
OLDNEW
« no previous file with comments | « lib/compiler/implementation/scanner/scanner.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698