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

Unified Diff: pkg/compiler/lib/src/patch_parser.dart

Issue 2738313002: rename fasta.Token.value --> lexeme (Closed)
Patch Set: merge 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/compiler/lib/src/parser/node_listener.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/patch_parser.dart
diff --git a/pkg/compiler/lib/src/patch_parser.dart b/pkg/compiler/lib/src/patch_parser.dart
index 45ff58527f6cd1a05229df78834f44eaf1fe6a23..72494d23d00b514c5d9c6941aa4d0b7250fefa82 100644
--- a/pkg/compiler/lib/src/patch_parser.dart
+++ b/pkg/compiler/lib/src/patch_parser.dart
@@ -393,11 +393,11 @@ class NativeAnnotationHandler implements EagerAnnotationHandler<String> {
String getNativeAnnotation(MetadataAnnotationX annotation) {
if (annotation.beginToken != null &&
- annotation.beginToken.next.value == 'Native') {
+ annotation.beginToken.next.lexeme == 'Native') {
// Skipping '@', 'Native', and '('.
Token argument = annotation.beginToken.next.next.next;
if (argument is StringToken) {
- return argument.value;
+ return argument.lexeme;
}
}
return null;
@@ -434,7 +434,8 @@ class JsInteropAnnotationHandler implements EagerAnnotationHandler<bool> {
const JsInteropAnnotationHandler();
bool hasJsNameAnnotation(MetadataAnnotationX annotation) =>
- annotation.beginToken != null && annotation.beginToken.next.value == 'JS';
+ annotation.beginToken != null &&
+ annotation.beginToken.next.lexeme == 'JS';
bool apply(
Compiler compiler, Element element, MetadataAnnotation annotation) {
@@ -466,13 +467,13 @@ class PatchAnnotationHandler implements EagerAnnotationHandler<PatchVersion> {
PatchVersion getPatchVersion(MetadataAnnotationX annotation) {
if (annotation.beginToken != null) {
- if (annotation.beginToken.next.value == 'patch') {
+ if (annotation.beginToken.next.lexeme == 'patch') {
return const PatchVersion(null);
- } else if (annotation.beginToken.next.value == 'patch_full') {
+ } else if (annotation.beginToken.next.lexeme == 'patch_full') {
return const PatchVersion('full');
- } else if (annotation.beginToken.next.value == 'patch_lazy') {
+ } else if (annotation.beginToken.next.lexeme == 'patch_lazy') {
return const PatchVersion('lazy');
- } else if (annotation.beginToken.next.value == 'patch_startup') {
+ } else if (annotation.beginToken.next.lexeme == 'patch_startup') {
return const PatchVersion('startup');
}
}
« no previous file with comments | « pkg/compiler/lib/src/parser/node_listener.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698