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

Side by Side Diff: pkg/fasta/lib/src/builder/metadata_builder.dart

Issue 2629063005: Fasta builders. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 library fasta.metadata_builder;
6
7 import 'builder.dart' show
8 Builder,
9 TypeBuilder;
10
11 import 'constructor_reference_builder.dart' show
12 ConstructorReferenceBuilder;
13
14 abstract class MetadataBuilder<T extends TypeBuilder> extends Builder {
15 MetadataBuilder();
16
17 factory MetadataBuilder.fromConstructor(
18 ConstructorReferenceBuilder constructorReference, List arguments) {
19 return new ConstructorMetadataBuilder(constructorReference, arguments);
20 }
21
22 factory MetadataBuilder.fromExpression(String expression, String postfix) {
23 return new ExpressionMetadataBuilder(expression, postfix);
24 }
25 }
26
27 class ConstructorMetadataBuilder<T extends TypeBuilder>
28 extends MetadataBuilder<T> {
29 final ConstructorReferenceBuilder constructorReference;
30
31 final List arguments;
32
33 ConstructorMetadataBuilder(this.constructorReference, this.arguments);
34 }
35
36 /// Expression metadata (without arguments).
37 ///
38 /// Matches this grammar rule:
39 ///
40 /// '@' qualified (‘.’ identifier)?
41 class ExpressionMetadataBuilder<T extends TypeBuilder>
42 extends MetadataBuilder<T> {
43 final String qualified;
44
45 final String identifier;
46
47 ExpressionMetadataBuilder(this.qualified, this.identifier);
48 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/builder/member_builder.dart ('k') | pkg/fasta/lib/src/builder/mixed_accessor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698