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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 2837473002: merge fasta.PrecedenceInfo into analyzer.TokenType (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index e58160a1419555a6372c76d902fe9a9bcaf13860..d651aa28bf58609490ab67512cec98ad33bb6c07 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -58,14 +58,19 @@ import '../scanner.dart' show ErrorToken;
import '../scanner/recover.dart' show closeBraceFor, skipToEof;
-import '../../scanner/token.dart' show Keyword;
-
-import '../scanner/precedence.dart'
+import '../../scanner/token.dart'
show
ASSIGNMENT_PRECEDENCE,
- AS_INFO,
CASCADE_PRECEDENCE,
EQUALITY_PRECEDENCE,
+ Keyword,
+ POSTFIX_PRECEDENCE,
+ RELATIONAL_PRECEDENCE,
+ TokenType;
+
+import '../scanner/precedence.dart'
+ show
+ AS_INFO,
GT_INFO,
IS_INFO,
MINUS_MINUS_INFO,
@@ -73,11 +78,8 @@ import '../scanner/precedence.dart'
OPEN_SQUARE_BRACKET_INFO,
PERIOD_INFO,
PLUS_PLUS_INFO,
- POSTFIX_PRECEDENCE,
- PrecedenceInfo,
QUESTION_INFO,
QUESTION_PERIOD_INFO,
- RELATIONAL_PRECEDENCE,
SCRIPT_INFO;
import '../scanner/token.dart'
@@ -2726,7 +2728,7 @@ class Parser {
assert(precedence >= 1);
assert(precedence <= POSTFIX_PRECEDENCE);
token = parseUnaryExpression(token, allowCascades);
- PrecedenceInfo info = token.info;
+ TokenType info = token.info;
int tokenLevel = info.precedence;
for (int level = tokenLevel; level >= precedence; --level) {
while (identical(tokenLevel, level)) {
« no previous file with comments | « pkg/compiler/lib/src/serialization/serialization.dart ('k') | pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698