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

Unified Diff: pkg/front_end/test/scanner_roundtrip_test.dart

Issue 2755433004: align fasta.PrecedenceInfo.precedence with analyzer.TokenType.precedence (Closed)
Patch Set: increase precedence of --/++ to 16 in fasta and analyzer Created 3 years, 9 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/test/scanner_roundtrip_test.dart
diff --git a/pkg/front_end/test/scanner_roundtrip_test.dart b/pkg/front_end/test/scanner_roundtrip_test.dart
index 0b27e6b80ee71525adeab77915b8237a05f754b8..1bfc78fbbddec202cdc6d0d4bb5a02de8376e37e 100644
--- a/pkg/front_end/test/scanner_roundtrip_test.dart
+++ b/pkg/front_end/test/scanner_roundtrip_test.dart
@@ -263,4 +263,14 @@ class ScannerTest_RoundTrip extends ScannerTest {
assertIsOperator(tt.lexeme, operatorTokenTypes.contains(tt));
}
}
+
+ void test_precedence() {
+ for (TokenType tt in allTokenTypes) {
+ for (PrecedenceInfo info in PrecedenceInfo.all) {
+ if (info.value == tt.lexeme || info.value == tt.name.toLowerCase()) {
+ expect(tt.precedence, info.precedence, reason: tt.name);
+ }
+ }
+ }
+ }
}
« pkg/front_end/lib/src/scanner/token.dart ('K') | « pkg/front_end/lib/src/scanner/token.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698