OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library docgen.models.annotation; | 5 library docgen.models.annotation; |
6 | 6 |
7 import '../exports/source_mirrors.dart'; | 7 import '../exports/source_mirrors.dart'; |
8 | 8 |
9 import '../exports/dart2js_mirrors.dart' show ResolvedNode; | 9 import '../exports/dart2js_mirrors.dart' show ResolvedNode; |
10 | 10 |
11 import '../library_helpers.dart'; | 11 import '../library_helpers.dart'; |
12 | 12 |
13 import 'library.dart'; | 13 import 'library.dart'; |
14 import 'mirror_based.dart'; | 14 import 'mirror_based.dart'; |
15 | 15 |
16 import 'dart:mirrors'; | 16 import 'dart:mirrors'; |
17 import 'package:compiler/implementation/tree/tree.dart'; | 17 import 'package:compiler/src/tree/tree.dart'; |
18 | 18 |
19 /// Holds the name of the annotation, and its parameters. | 19 /// Holds the name of the annotation, and its parameters. |
20 class Annotation extends MirrorBased<ClassMirror> { | 20 class Annotation extends MirrorBased<ClassMirror> { |
21 /// The class of this annotation. | 21 /// The class of this annotation. |
22 DeclarationMirror mirror; | 22 DeclarationMirror mirror; |
23 Send node; | 23 Send node; |
24 final Library owningLibrary; | 24 final Library owningLibrary; |
25 List<String> parameters; | 25 List<String> parameters; |
26 | 26 |
27 Annotation(ResolvedNode resolvedNode, this.owningLibrary) { | 27 Annotation(ResolvedNode resolvedNode, this.owningLibrary) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 addToken(node.beginToken); | 105 addToken(node.beginToken); |
106 if (recursionLevel == 1) sb.clear(); | 106 if (recursionLevel == 1) sb.clear(); |
107 if (node.nodes != null) { | 107 if (node.nodes != null) { |
108 recursionLevel++; | 108 recursionLevel++; |
109 unparseNodeListFrom(node, node.nodes); | 109 unparseNodeListFrom(node, node.nodes); |
110 recursionLevel--; | 110 recursionLevel--; |
111 } | 111 } |
112 if (node.endToken != null) write(node.endToken.value); | 112 if (node.endToken != null) write(node.endToken.value); |
113 } | 113 } |
114 } | 114 } |
OLD | NEW |