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

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

Issue 2757153002: update fasta scanner to generate two types of comments (Closed)
Patch Set: rebase 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
« no previous file with comments | « pkg/front_end/lib/src/scanner/token.dart ('k') | pkg/front_end/test/token_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/precedence_info_test.dart
diff --git a/pkg/front_end/test/precedence_info_test.dart b/pkg/front_end/test/precedence_info_test.dart
index 41c38bbdb7ba12ec406efcce4a43b4921ecca73e..6783a6650607d88dced8c6f74159226983fa9925 100644
--- a/pkg/front_end/test/precedence_info_test.dart
+++ b/pkg/front_end/test/precedence_info_test.dart
@@ -118,6 +118,7 @@ class PrecedenceInfoTest {
assertLexeme('var'); // KEYWORD
assertLexeme('#!/'); // SCRIPT_TAG
assertLexeme('"foo"'); // STRING
+ assertLexeme('bar'); // IDENTIFIER
if (includeLazyAssignmentOperators) {
assertLexeme('&&=');
assertLexeme('||=');
@@ -345,11 +346,10 @@ class PrecedenceInfoTest {
'~/',
];
assertInfo((String source, fasta.Token token) {
- expect(token.type.isUserDefinableOperator,
- userDefinableOperatorLexemes.contains(source),
- reason: source);
- expect(token.isUserDefinableOperator,
- userDefinableOperatorLexemes.contains(source),
+ var userDefinable = userDefinableOperatorLexemes.contains(source);
+ expect(token.type.isUserDefinableOperator, userDefinable, reason: source);
+ expect(token.isUserDefinableOperator, userDefinable, reason: source);
+ expect(fasta.isUserDefinableOperator(token.lexeme), userDefinable,
reason: source);
});
}
@@ -504,7 +504,7 @@ class PrecedenceInfoTest {
assertLexeme('1', TokenType.INT);
assertLexeme('var', TokenType.KEYWORD);
assertLexeme('#!/', TokenType.SCRIPT_TAG);
- assertLexeme('"foo"',TokenType.STRING);
+ assertLexeme('"foo"', TokenType.STRING);
expect(STRING_INTERPOLATION_INFO,
same(TokenType.STRING_INTERPOLATION_EXPRESSION));
« no previous file with comments | « pkg/front_end/lib/src/scanner/token.dart ('k') | pkg/front_end/test/token_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698