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

Side by Side Diff: lib/src/codegen/code_generator.dart

Issue 973433003: Initial cut for a development server (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 | « lib/devc.dart ('k') | lib/src/codegen/dart_codegen.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 ddc.src.codegen.code_generator; 5 library ddc.src.codegen.code_generator;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer/src/generated/ast.dart' show CompilationUnit; 9 import 'package:analyzer/src/generated/ast.dart' show CompilationUnit;
10 import 'package:analyzer/src/generated/element.dart' 10 import 'package:analyzer/src/generated/element.dart'
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return new Uri(path: suffix); 122 return new Uri(path: suffix);
123 } 123 }
124 assert(index == 0); 124 assert(index == 0);
125 return new Uri( 125 return new Uri(
126 scheme: 'package', path: path.joinAll(parts.sublist(index + 1))); 126 scheme: 'package', path: path.joinAll(parts.sublist(index + 1)));
127 } 127 }
128 128
129 CodeGenerator(String outDir, this.root, this.rules) 129 CodeGenerator(String outDir, this.root, this.rules)
130 : outDir = path.absolute(outDir); 130 : outDir = path.absolute(outDir);
131 131
132 // TODO(jmesserly): JS generates per library outputs, so it does not use this
133 // method and instead overrides generateLibrary.
134 void generateUnit(CompilationUnit unit, LibraryInfo info, String libraryDir) {
135 }
136
137 void generateLibrary(Iterable<CompilationUnit> units, LibraryInfo info, 132 void generateLibrary(Iterable<CompilationUnit> units, LibraryInfo info,
138 CheckerReporter reporter) { 133 CheckerReporter reporter);
139 for (var unit in units) {
140 var outputDir = makeOutputDirectory(info, unit);
141 reporter.enterSource(unit.element.source);
142 generateUnit(unit, info, outputDir);
143 reporter.leaveSource();
144 }
145 }
146 } 134 }
OLDNEW
« no previous file with comments | « lib/devc.dart ('k') | lib/src/codegen/dart_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698