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

Side by Side Diff: tools/servicec/lib/src/plugins/shared.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « tools/servicec/lib/src/plugins/java.dart ('k') | tools/servicec/lib/src/pretty_printer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dartino 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 old_servicec.plugins.shared;
6
7 import 'package:servicec/util.dart' as strings;
8
9 import '../parser.dart';
10 export '../parser.dart';
11
12 abstract class CodeGenerationVisitor extends Visitor {
13 final String path;
14 final StringBuffer buffer = new StringBuffer();
15 CodeGenerationVisitor(this.path);
16
17 void write(String s) => buffer.write(s);
18 void writeln([String s = '']) => buffer.writeln(s);
19
20 String camelize(String name) {
21 return strings.camelize(strings.underscore(name));
22 }
23
24 visit(Node node) => node.accept(this);
25
26 visitStruct(Struct node) {
27 // TODO(kasper): Stop ignoring this.
28 }
29
30 visitUnion(Union node) {
31 // TODO(kasper): Stop ignoring this.
32 }
33
34 visitNodes(List<Node> nodes, String separatedBy(bool first)) {
35 bool first = true;
36 for (int i = 0; i < nodes.length; i++) {
37 write(separatedBy(first));
38 if (first) first = false;
39 visit(nodes[i]);
40 }
41 }
42 }
OLDNEW
« no previous file with comments | « tools/servicec/lib/src/plugins/java.dart ('k') | tools/servicec/lib/src/pretty_printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698