Chromium Code Reviews| 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..12c937e6e14af8f8f47ae4df36ee7262cb134945 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,7 @@ 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'; |
|
ahe
2017/03/10 07:26:11
Long line.
danrubel
2017/03/11 22:10:38
Reformatted.
|
| bool apply( |
| Compiler compiler, Element element, MetadataAnnotation annotation) { |
| @@ -466,13 +466,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'); |
| } |
| } |