| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /** | 5 /** |
| 6 * Defines the tokens that are produced by the scanner, used by the parser, and | 6 * Defines the tokens that are produced by the scanner, used by the parser, and |
| 7 * referenced from the [AST structure](ast.dart). | 7 * referenced from the [AST structure](ast.dart). |
| 8 */ | 8 */ |
| 9 library analyzer.dart.ast.token; | 9 library analyzer.dart.ast.token; |
| 10 | 10 |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 const TokenType._('SINGLE_LINE_COMMENT'); | 402 const TokenType._('SINGLE_LINE_COMMENT'); |
| 403 | 403 |
| 404 static const TokenType STRING = const TokenType._('STRING'); | 404 static const TokenType STRING = const TokenType._('STRING'); |
| 405 | 405 |
| 406 static const TokenType AMPERSAND = | 406 static const TokenType AMPERSAND = |
| 407 const TokenType._('AMPERSAND', TokenClass.BITWISE_AND_OPERATOR, '&'); | 407 const TokenType._('AMPERSAND', TokenClass.BITWISE_AND_OPERATOR, '&'); |
| 408 | 408 |
| 409 static const TokenType AMPERSAND_AMPERSAND = const TokenType._( | 409 static const TokenType AMPERSAND_AMPERSAND = const TokenType._( |
| 410 'AMPERSAND_AMPERSAND', TokenClass.LOGICAL_AND_OPERATOR, '&&'); | 410 'AMPERSAND_AMPERSAND', TokenClass.LOGICAL_AND_OPERATOR, '&&'); |
| 411 | 411 |
| 412 static const TokenType AMPERSAND_AMPERSAND_EQ = const TokenType._( |
| 413 'AMPERSAND_AMPERSAND_EQ', TokenClass.ASSIGNMENT_OPERATOR, '&&='); |
| 414 |
| 412 static const TokenType AMPERSAND_EQ = | 415 static const TokenType AMPERSAND_EQ = |
| 413 const TokenType._('AMPERSAND_EQ', TokenClass.ASSIGNMENT_OPERATOR, '&='); | 416 const TokenType._('AMPERSAND_EQ', TokenClass.ASSIGNMENT_OPERATOR, '&='); |
| 414 | 417 |
| 415 static const TokenType AT = const TokenType._('AT', TokenClass.NO_CLASS, '@'); | 418 static const TokenType AT = const TokenType._('AT', TokenClass.NO_CLASS, '@'); |
| 416 | 419 |
| 417 static const TokenType BANG = | 420 static const TokenType BANG = |
| 418 const TokenType._('BANG', TokenClass.UNARY_PREFIX_OPERATOR, '!'); | 421 const TokenType._('BANG', TokenClass.UNARY_PREFIX_OPERATOR, '!'); |
| 419 | 422 |
| 420 static const TokenType BANG_EQ = | 423 static const TokenType BANG_EQ = |
| 421 const TokenType._('BANG_EQ', TokenClass.EQUALITY_OPERATOR, '!='); | 424 const TokenType._('BANG_EQ', TokenClass.EQUALITY_OPERATOR, '!='); |
| 422 | 425 |
| 423 static const TokenType BAR = | 426 static const TokenType BAR = |
| 424 const TokenType._('BAR', TokenClass.BITWISE_OR_OPERATOR, '|'); | 427 const TokenType._('BAR', TokenClass.BITWISE_OR_OPERATOR, '|'); |
| 425 | 428 |
| 426 static const TokenType BAR_BAR = | 429 static const TokenType BAR_BAR = |
| 427 const TokenType._('BAR_BAR', TokenClass.LOGICAL_OR_OPERATOR, '||'); | 430 const TokenType._('BAR_BAR', TokenClass.LOGICAL_OR_OPERATOR, '||'); |
| 428 | 431 |
| 432 static const TokenType BAR_BAR_EQ = |
| 433 const TokenType._('BAR_BAR_EQ', TokenClass.ASSIGNMENT_OPERATOR, '||='); |
| 434 |
| 429 static const TokenType BAR_EQ = | 435 static const TokenType BAR_EQ = |
| 430 const TokenType._('BAR_EQ', TokenClass.ASSIGNMENT_OPERATOR, '|='); | 436 const TokenType._('BAR_EQ', TokenClass.ASSIGNMENT_OPERATOR, '|='); |
| 431 | 437 |
| 432 static const TokenType COLON = | 438 static const TokenType COLON = |
| 433 const TokenType._('COLON', TokenClass.NO_CLASS, ':'); | 439 const TokenType._('COLON', TokenClass.NO_CLASS, ':'); |
| 434 | 440 |
| 435 static const TokenType COMMA = | 441 static const TokenType COMMA = |
| 436 const TokenType._('COMMA', TokenClass.NO_CLASS, ','); | 442 const TokenType._('COMMA', TokenClass.NO_CLASS, ','); |
| 437 | 443 |
| 438 static const TokenType CARET = | 444 static const TokenType CARET = |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 */ | 742 */ |
| 737 class _EndOfFileTokenType extends TokenType { | 743 class _EndOfFileTokenType extends TokenType { |
| 738 /** | 744 /** |
| 739 * Initialize a newly created token. | 745 * Initialize a newly created token. |
| 740 */ | 746 */ |
| 741 const _EndOfFileTokenType() : super._('EOF', TokenClass.NO_CLASS, ''); | 747 const _EndOfFileTokenType() : super._('EOF', TokenClass.NO_CLASS, ''); |
| 742 | 748 |
| 743 @override | 749 @override |
| 744 String toString() => '-eof-'; | 750 String toString() => '-eof-'; |
| 745 } | 751 } |
| OLD | NEW |