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

Side by Side Diff: pkg/fasta/lib/src/builder/mixin_application_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.mixin_application_builder;
6
7 import 'builder.dart' show
8 TypeBuilder;
9
10 import 'scope.dart' show
11 Scope;
12
13 abstract class MixinApplicationBuilder<T extends TypeBuilder>
14 extends TypeBuilder {
15 final T supertype;
16 final List<T> mixins;
17
18 MixinApplicationBuilder(this.supertype, this.mixins);
19
20 void resolveIn(Scope scope) {
21 supertype.resolveIn(scope);
22 for (T t in mixins) {
23 t.resolveIn(scope);
24 }
25 }
26
27 String get debugName => "MixinApplicationBuilder";
28
29 StringBuffer printOn(StringBuffer buffer) {
30 buffer.write(supertype);
31 buffer.write(" with ");
32 bool first = true;
33 for (T t in mixins) {
34 if (!first) buffer.write(", ");
35 first = false;
36 t.printOn(buffer);
37 }
38 return buffer;
39 }
40 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/builder/mixed_accessor.dart ('k') | pkg/fasta/lib/src/builder/modifier_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698