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

Side by Side Diff: tools/servicec/lib/compiler.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/bin/servicec.dart ('k') | tools/servicec/lib/src/emitter.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.compiler;
6
7 import 'dart:io';
8
9 import 'src/emitter.dart';
10 import 'src/parser.dart';
11 import 'src/pretty_printer.dart';
12 import 'src/resolver.dart';
13
14 import 'src/plugins/cc.dart' as cc;
15 import 'src/plugins/dart.dart' as dart;
16 import 'src/plugins/java.dart' as java;
17
18 import 'package:path/path.dart' show join, dirname;
19
20 const List<String> RESOURCES = const [
21 "Service.podspec",
22 ];
23
24 void compile(String path,
25 Unit unit,
26 String resourcesDirectory,
27 String outputDirectory) {
28 resolve(unit);
29 dump(path, unit);
30
31 cc.generate(path, unit, resourcesDirectory, outputDirectory);
32 dart.generate(path, unit, resourcesDirectory, outputDirectory);
33 java.generate(path, unit, resourcesDirectory, outputDirectory);
34
35 for (String resource in RESOURCES) {
36 String resourcePath = join(resourcesDirectory, resource);
37 File file = new File(resourcePath);
38 String contents = file.readAsStringSync();
39 writeToFile(outputDirectory, resource, contents);
40 }
41 }
42
43 void dump(String path, Unit unit) {
44 String banner = "Parsed IDL for $path";
45 print(banner);
46 print('-' * banner.length);
47 var printer = new PrettyPrinter();
48 printer.visit(unit);
49 String printed = printer.buffer.toString().replaceAll('\n', '\n ');
50 print(' $printed');
51 }
OLDNEW
« no previous file with comments | « tools/servicec/bin/servicec.dart ('k') | tools/servicec/lib/src/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698