OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.analyzer.token_utils; | 5 library fasta.analyzer.token_utils; |
6 | 6 |
7 import 'package:front_end/src/fasta/scanner/error_token.dart' show ErrorToken; | 7 import 'package:front_end/src/fasta/scanner/error_token.dart' show ErrorToken; |
8 | 8 |
9 import 'package:front_end/src/scanner/token.dart' show Keyword, Token; | 9 import 'package:front_end/src/scanner/token.dart' show Keyword, Token; |
10 | 10 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 token.lexeme, 0, token.lexeme.length, 0); | 314 token.lexeme, 0, token.lexeme.length, 0); |
315 } | 315 } |
316 return new CommentToken.fromSubstring(TokenType.SINGLE_LINE_COMMENT, | 316 return new CommentToken.fromSubstring(TokenType.SINGLE_LINE_COMMENT, |
317 token.lexeme, 0, token.lexeme.length, 0); | 317 token.lexeme, 0, token.lexeme.length, 0); |
318 case TokenType.STRING: | 318 case TokenType.STRING: |
319 return string(TokenType.STRING); | 319 return string(TokenType.STRING); |
320 case TokenType.AMPERSAND: | 320 case TokenType.AMPERSAND: |
321 return symbol(TokenType.AMPERSAND); | 321 return symbol(TokenType.AMPERSAND); |
322 case TokenType.AMPERSAND_AMPERSAND: | 322 case TokenType.AMPERSAND_AMPERSAND: |
323 return symbol(TokenType.AMPERSAND_AMPERSAND); | 323 return symbol(TokenType.AMPERSAND_AMPERSAND); |
324 // case TokenType.AMPERSAND_AMPERSAND_EQ | 324 case TokenType.AMPERSAND_AMPERSAND_EQ: |
| 325 return symbol(TokenType.AMPERSAND_AMPERSAND_EQ); |
325 case TokenType.AMPERSAND_EQ: | 326 case TokenType.AMPERSAND_EQ: |
326 return symbol(TokenType.AMPERSAND_EQ); | 327 return symbol(TokenType.AMPERSAND_EQ); |
327 case TokenType.AT: | 328 case TokenType.AT: |
328 return symbol(TokenType.AT); | 329 return symbol(TokenType.AT); |
329 case TokenType.BANG: | 330 case TokenType.BANG: |
330 return symbol(TokenType.BANG); | 331 return symbol(TokenType.BANG); |
331 case TokenType.BANG_EQ: | 332 case TokenType.BANG_EQ: |
332 return symbol(TokenType.BANG_EQ); | 333 return symbol(TokenType.BANG_EQ); |
333 case TokenType.BAR: | 334 case TokenType.BAR: |
334 return symbol(TokenType.BAR); | 335 return symbol(TokenType.BAR); |
335 case TokenType.BAR_BAR: | 336 case TokenType.BAR_BAR: |
336 return symbol(TokenType.BAR_BAR); | 337 return symbol(TokenType.BAR_BAR); |
337 // case TokenType.BAR_BAR_EQ | 338 case TokenType.BAR_BAR_EQ: |
| 339 return symbol(TokenType.BAR_BAR_EQ); |
338 case TokenType.BAR_EQ: | 340 case TokenType.BAR_EQ: |
339 return symbol(TokenType.BAR_EQ); | 341 return symbol(TokenType.BAR_EQ); |
340 case TokenType.COLON: | 342 case TokenType.COLON: |
341 return symbol(TokenType.COLON); | 343 return symbol(TokenType.COLON); |
342 case TokenType.COMMA: | 344 case TokenType.COMMA: |
343 return symbol(TokenType.COMMA); | 345 return symbol(TokenType.COMMA); |
344 case TokenType.CARET: | 346 case TokenType.CARET: |
345 return symbol(TokenType.CARET); | 347 return symbol(TokenType.CARET); |
346 case TokenType.CARET_EQ: | 348 case TokenType.CARET_EQ: |
347 return symbol(TokenType.CARET_EQ); | 349 return symbol(TokenType.CARET_EQ); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 "hide": analyzer.Keyword.HIDE, | 599 "hide": analyzer.Keyword.HIDE, |
598 "native": analyzer.Keyword.NATIVE, | 600 "native": analyzer.Keyword.NATIVE, |
599 "of": analyzer.Keyword.OF, | 601 "of": analyzer.Keyword.OF, |
600 "on": analyzer.Keyword.ON, | 602 "on": analyzer.Keyword.ON, |
601 "patch": analyzer.Keyword.PATCH, | 603 "patch": analyzer.Keyword.PATCH, |
602 "show": analyzer.Keyword.SHOW, | 604 "show": analyzer.Keyword.SHOW, |
603 "source": analyzer.Keyword.SOURCE, | 605 "source": analyzer.Keyword.SOURCE, |
604 "sync": analyzer.Keyword.SYNC, | 606 "sync": analyzer.Keyword.SYNC, |
605 "yield": analyzer.Keyword.YIELD, | 607 "yield": analyzer.Keyword.YIELD, |
606 }; | 608 }; |
OLD | NEW |