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

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

Issue 2794653002: fasta tokens implement analyzer token API (Closed)
Patch Set: merge Created 3 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.precedence; 5 library fasta.scanner.precedence;
6 6
7 import '../../scanner/token.dart'; 7 import '../../scanner/token.dart';
8 import 'token_constants.dart'; 8 import 'token_constants.dart';
9 9
10 class PrecedenceInfo implements TokenType { 10 class PrecedenceInfo implements TokenType {
11 final String value; 11 final String value;
12 final String name; 12 final String name;
13 final int precedence; 13 final int precedence;
14 final int kind; 14 final int kind;
15 final bool isOperator; 15 final bool isOperator;
16 final bool isUserDefinableOperator; 16 final bool isUserDefinableOperator;
17 17
18 const PrecedenceInfo(this.value, this.name, this.precedence, this.kind, 18 const PrecedenceInfo(this.value, this.name, this.precedence, this.kind,
19 {this.isOperator: false, this.isUserDefinableOperator: false}); 19 {this.isOperator: false, this.isUserDefinableOperator: false});
20 20
21 toString() => 'PrecedenceInfo($value, $precedence, $kind)'; 21 toString() => 'PrecedenceInfo($value, $name, $precedence, $kind)';
22 22
23 static const List<PrecedenceInfo> all = const <PrecedenceInfo>[ 23 static const List<PrecedenceInfo> all = const <PrecedenceInfo>[
24 BACKPING_INFO, 24 BACKPING_INFO,
25 BACKSLASH_INFO, 25 BACKSLASH_INFO,
26 PERIOD_PERIOD_PERIOD_INFO, 26 PERIOD_PERIOD_PERIOD_INFO,
27 PERIOD_PERIOD_INFO, 27 PERIOD_PERIOD_INFO,
28 BANG_INFO, 28 BANG_INFO,
29 COLON_INFO, 29 COLON_INFO,
30 INDEX_INFO, 30 INDEX_INFO,
31 MINUS_MINUS_INFO, 31 MINUS_MINUS_INFO,
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 'generic_comment_assign', 403 'generic_comment_assign',
404 'GENERIC_METHOD_TYPE_ASSIGN', 404 'GENERIC_METHOD_TYPE_ASSIGN',
405 0, 405 0,
406 GENERIC_METHOD_TYPE_ASSIGN_TOKEN); 406 GENERIC_METHOD_TYPE_ASSIGN_TOKEN);
407 407
408 const PrecedenceInfo GENERIC_METHOD_TYPE_LIST = const PrecedenceInfo( 408 const PrecedenceInfo GENERIC_METHOD_TYPE_LIST = const PrecedenceInfo(
409 'generic_comment_list', 409 'generic_comment_list',
410 'GENERIC_METHOD_TYPE_LIST', 410 'GENERIC_METHOD_TYPE_LIST',
411 0, 411 0,
412 GENERIC_METHOD_TYPE_LIST_TOKEN); 412 GENERIC_METHOD_TYPE_LIST_TOKEN);
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/front_end/lib/src/fasta/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698