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

Side by Side Diff: pkg/front_end/lib/src/fasta/scanner/token.dart

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Handle function types with `void` return type. Created 3 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
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 library fasta.scanner.token; 5 library fasta.scanner.token;
6 6
7 import 'dart:collection' show 7 import 'dart:collection' show
8 HashSet; 8 HashSet;
9 9
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 113
114 /// The character offset of the end of this token within the source text. 114 /// The character offset of the end of this token within the source text.
115 int get charEnd => charOffset + charCount; 115 int get charEnd => charOffset + charCount;
116 116
117 bool get isEof => false; 117 bool get isEof => false;
118 } 118 }
119 119
120 /** 120 /**
121 * A [SymbolToken] represents the symbol in its precendence info. 121 * A [SymbolToken] represents the symbol in its precedence info.
122 * Also used for end of file with EOF_INFO. 122 * Also used for end of file with EOF_INFO.
123 */ 123 */
124 class SymbolToken extends Token { 124 class SymbolToken extends Token {
125 final PrecedenceInfo info; 125 final PrecedenceInfo info;
126 126
127 SymbolToken(this.info, int charOffset) : super(charOffset); 127 SymbolToken(this.info, int charOffset) : super(charOffset);
128 128
129 String get value => info.value; 129 String get value => info.value;
130 130
131 String get stringValue => info.value; 131 String get stringValue => info.value;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 value == '<=' || 367 value == '<=' ||
368 value == '<' || 368 value == '<' ||
369 value == '&' || 369 value == '&' ||
370 value == '^' || 370 value == '^' ||
371 value == '|'; 371 value == '|';
372 } 372 }
373 373
374 bool isTernaryOperator(String value) => value == '[]='; 374 bool isTernaryOperator(String value) => value == '[]=';
375 375
376 bool isMinusOperator(String value) => value == '-'; 376 bool isMinusOperator(String value) => value == '-';
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698