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

Unified Diff: modules/angular2/src/transform/annotation_processor.dart

Issue 927373004: Initial commit of Dart transformer to generate constructor stubs, see https://github.com/angular/an… (Closed) Base URL: https://github.com/kegluneq/angular.git@master
Patch Set: Fixing review comments Created 5 years, 10 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 | « no previous file | modules/angular2/src/transform/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/angular2/src/transform/annotation_processor.dart
diff --git a/modules/angular2/src/transform/annotation_processor.dart b/modules/angular2/src/transform/annotation_processor.dart
index 323aa23df82250524a8aad5aea68e98be9d4fad6..b8399d8cc30cc5ec7f2ab6ee84e6bed8b5ba4655 100644
--- a/modules/angular2/src/transform/annotation_processor.dart
+++ b/modules/angular2/src/transform/annotation_processor.dart
@@ -1,3 +1,5 @@
+library angular2.src.transform;
+
import 'dart:collection' show Queue;
import 'package:analyzer/src/generated/element.dart';
@@ -5,7 +7,7 @@ import 'package:analyzer/src/generated/element.dart';
/// [_annotationClass] and reporting the resulting (element, annotation) pairs.
class AnnotationMatcher {
/// Queue for annotations.
- final initQueue = new Queue<AnnotationMatch>();
+ final matchQueue = new Queue<AnnotationMatch>();
/// All the annotations we have seen for each element
final _seenAnnotations = new Map<Element, Set<ElementAnnotation>>();
@@ -16,7 +18,7 @@ class AnnotationMatcher {
/// Records all [_annotationClass] annotations and the [element]s they apply to.
/// Returns [true] if 1) [element] is annotated with [_annotationClass] and
- /// 2) ([element], [_annotationClass]) has been seen previously.
+ /// 2) ([element], [_annotationClass]) has not been seen previously.
bool processAnnotations(ClassElement element) {
var found = false;
element.metadata.where((ElementAnnotation meta) {
@@ -31,7 +33,7 @@ class AnnotationMatcher {
.contains(meta);
}).forEach((ElementAnnotation meta) {
_seenAnnotations[element].add(meta);
- initQueue.addLast(new AnnotationMatch(element, meta));
+ matchQueue.addLast(new AnnotationMatch(element, meta));
found = true;
});
return found;
« no previous file with comments | « no previous file | modules/angular2/src/transform/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698