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

Unified Diff: pkg/analyzer/tool/summary/generate.dart

Issue 2742333005: Move some of analyzer's code generation utilities into front_end. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/tool/summary/check_test.dart ('k') | pkg/analyzer/tool/task_dependency_graph/check_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/summary/generate.dart
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index f273e7eeec2905bea1ec518084eaf7b63342984d..e6e86f3cb0c6f6f609fb6850f2f06c73d12436e7 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -20,11 +20,9 @@
library analyzer.tool.summary.generate;
import 'dart:convert';
-import 'dart:io' hide File;
+import 'dart:io';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/codegen/tools.dart';
+import 'package:front_end/src/codegen/tools.dart';
import 'package:front_end/src/fasta/scanner/string_scanner.dart';
import 'package:front_end/src/fasta/scanner/token.dart';
import 'package:path/path.dart';
@@ -80,11 +78,10 @@ class _CodeGenerator {
_CodeGenerator(String pkgPath) {
// Parse the input "IDL" file.
- PhysicalResourceProvider provider = new PhysicalResourceProvider(
- PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS);
String idlPath = join(pkgPath, 'lib', 'src', 'summary', 'idl.dart');
- File idlFile = provider.getFile(idlPath);
- String idlText = idlFile.readAsStringSync();
+ File idlFile = new File(idlPath);
+ String idlText =
+ idlFile.readAsStringSync().replaceAll(new RegExp('\r\n?'), '\n');
// Extract a description of the IDL and make sure it is valid.
var scanner = new StringScanner(idlText, includeComments: true);
var startingToken = scanner.tokenize();
« no previous file with comments | « pkg/analyzer/tool/summary/check_test.dart ('k') | pkg/analyzer/tool/task_dependency_graph/check_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698