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

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: Update tests. Fix scanner. 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 // Sequence operator has the lowest precedence.
ahe 2012/04/16 08:55:23 There is no sequence operator in the Dart language
Lasse Reichstein Nielsen 2012/04/16 12:41:38 Changed "sequence" to "cascade" - which is what it
252 final int SEQUENCE_PRECEDENCE = 1;
252 final PrecedenceInfo PERIOD_PERIOD_INFO = 253 final PrecedenceInfo PERIOD_PERIOD_INFO =
253 const PrecedenceInfo(const SourceString('..'), 0, PERIOD_PERIOD_TOKEN); 254 const PrecedenceInfo(const SourceString('..'), SEQUENCE_PRECEDENCE,
255 PERIOD_PERIOD_TOKEN);
254 256
255 final PrecedenceInfo BANG_INFO = 257 final PrecedenceInfo BANG_INFO =
256 const PrecedenceInfo(const SourceString('!'), 0, BANG_TOKEN); 258 const PrecedenceInfo(const SourceString('!'), 0, BANG_TOKEN);
257 final PrecedenceInfo COLON_INFO = 259 final PrecedenceInfo COLON_INFO =
258 const PrecedenceInfo(const SourceString(':'), 0, COLON_TOKEN); 260 const PrecedenceInfo(const SourceString(':'), 0, COLON_TOKEN);
259 final PrecedenceInfo INDEX_INFO = 261 final PrecedenceInfo INDEX_INFO =
260 const PrecedenceInfo(const SourceString('[]'), 0, INDEX_TOKEN); 262 const PrecedenceInfo(const SourceString('[]'), 0, INDEX_TOKEN);
261 final PrecedenceInfo MINUS_MINUS_INFO = 263 final PrecedenceInfo MINUS_MINUS_INFO =
262 const PrecedenceInfo(const SourceString('--'), POSTFIX_PRECEDENCE, 264 const PrecedenceInfo(const SourceString('--'), POSTFIX_PRECEDENCE,
263 MINUS_MINUS_TOKEN); 265 MINUS_MINUS_TOKEN);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 431
430 final PrecedenceInfo STRING_INTERPOLATION_INFO = 432 final PrecedenceInfo STRING_INTERPOLATION_INFO =
431 const PrecedenceInfo(const SourceString('\${'), 0, 433 const PrecedenceInfo(const SourceString('\${'), 0,
432 STRING_INTERPOLATION_TOKEN); 434 STRING_INTERPOLATION_TOKEN);
433 435
434 final PrecedenceInfo HEXADECIMAL_INFO = 436 final PrecedenceInfo HEXADECIMAL_INFO =
435 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); 437 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN);
436 438
437 // For reporting lexical errors. 439 // For reporting lexical errors.
438 final PrecedenceInfo ERROR_INFO = 440 final PrecedenceInfo ERROR_INFO =
439 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); 441 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698