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

Unified Diff: tools/immic/lib/src/importer.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/immic/lib/src/grammar.dart ('k') | tools/immic/lib/src/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/immic/lib/src/importer.dart
diff --git a/tools/immic/lib/src/importer.dart b/tools/immic/lib/src/importer.dart
deleted file mode 100644
index b6893010bc635c3fc0d10fb01d26dede3343eab3..0000000000000000000000000000000000000000
--- a/tools/immic/lib/src/importer.dart
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-import 'dart:io';
-import 'dart:convert';
-
-import 'parser.dart';
-import 'primitives.dart' as primitives;
-import 'struct_layout.dart';
-
-import 'package:path/path.dart' show join, dirname;
-
-Future<Map> parseImports(Unit unit, ImportResolver resolver, context) async {
- Map units = {};
- await ImportParser.parse(unit, resolver, context, units);
- return units;
-}
-
-abstract class ImportResolver<Context> {
- Context resolve(Import import, Context context);
- Future<String> read(Context context);
-}
-
-class ImportParser<Context> extends Visitor {
- final ImportResolver resolver;
- final Context context;
- final Map<Context, Unit> units;
-
- static parse(Unit unit, ImportResolver resolver, Context context, Map units) {
- var parser = new ImportParser(resolver, context, units);
- return parser.visitUnit(unit);
- }
-
- ImportParser(this.resolver, this.context, this.units);
-
- visitUnit(Unit unit) async {
- units[context] = unit;
- for (var import in unit.imports) {
- await visitImport(import);
- }
- }
-
- visitImport(Import import) async {
- var newContext = resolver.resolve(import, context);
- if (newContext != null) {
- String input = await resolver.read(newContext);
- Unit unit = parseUnit(input);
- await parse(unit, resolver, newContext, units);
- }
- }
-}
« no previous file with comments | « tools/immic/lib/src/grammar.dart ('k') | tools/immic/lib/src/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698