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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/scanner/scanner.dart

Issue 346603003: Allow #[] and #[]= symbols. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file for dart2dart. Created 6 years, 6 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 | « no previous file | tests/co19/co19-dart2dart.status » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of scanner; 5 part of scanner;
6 6
7 abstract class Scanner { 7 abstract class Scanner {
8 Token tokenize(); 8 Token tokenize();
9 9
10 factory Scanner(SourceFile file, {bool includeComments: false}) { 10 factory Scanner(SourceFile file, {bool includeComments: false}) {
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 appendPrecedenceToken(TILDE_INFO); 429 appendPrecedenceToken(TILDE_INFO);
430 return next; 430 return next;
431 } 431 }
432 } 432 }
433 433
434 int tokenizeOpenSquareBracket(int next) { 434 int tokenizeOpenSquareBracket(int next) {
435 // [ [] []= 435 // [ [] []=
436 next = advance(); 436 next = advance();
437 if (identical(next, $CLOSE_SQUARE_BRACKET)) { 437 if (identical(next, $CLOSE_SQUARE_BRACKET)) {
438 Token token = previousToken(); 438 Token token = previousToken();
439 if (token is KeywordToken && 439 if (token is KeywordToken && token.keyword.syntax == 'operator' ||
440 identical(token.keyword.syntax, 'operator')) { 440 token is SymbolToken && token.info == HASH_INFO) {
441 return select($EQ, INDEX_EQ_INFO, INDEX_INFO); 441 return select($EQ, INDEX_EQ_INFO, INDEX_INFO);
442 } 442 }
443 } 443 }
444 appendBeginGroup(OPEN_SQUARE_BRACKET_INFO); 444 appendBeginGroup(OPEN_SQUARE_BRACKET_INFO);
445 return next; 445 return next;
446 } 446 }
447 447
448 int tokenizeCaret(int next) { 448 int tokenizeCaret(int next) {
449 // ^ ^= 449 // ^ ^=
450 return select($EQ, CARET_EQ_INFO, CARET_INFO); 450 return select($EQ, CARET_EQ_INFO, CARET_INFO);
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 1146
1147 PrecedenceInfo closeBraceInfoFor(BeginGroupToken begin) { 1147 PrecedenceInfo closeBraceInfoFor(BeginGroupToken begin) {
1148 return const { 1148 return const {
1149 '(': CLOSE_PAREN_INFO, 1149 '(': CLOSE_PAREN_INFO,
1150 '[': CLOSE_SQUARE_BRACKET_INFO, 1150 '[': CLOSE_SQUARE_BRACKET_INFO,
1151 '{': CLOSE_CURLY_BRACKET_INFO, 1151 '{': CLOSE_CURLY_BRACKET_INFO,
1152 '<': GT_INFO, 1152 '<': GT_INFO,
1153 r'${': CLOSE_CURLY_BRACKET_INFO, 1153 r'${': CLOSE_CURLY_BRACKET_INFO,
1154 }[begin.value]; 1154 }[begin.value];
1155 } 1155 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698