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

Unified Diff: pkg/compiler/lib/src/patch_parser.dart

Issue 1867243004: Begin refactoring compiler out of diet parser and scanner (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
Index: pkg/compiler/lib/src/patch_parser.dart
diff --git a/pkg/compiler/lib/src/patch_parser.dart b/pkg/compiler/lib/src/patch_parser.dart
index 6a1589ca321e72e18cd4cf674ecd3da99279f23a..0e9943d481191eeeb7a5cc77eb2b7f33ce03a6fe 100644
--- a/pkg/compiler/lib/src/patch_parser.dart
+++ b/pkg/compiler/lib/src/patch_parser.dart
@@ -130,6 +130,7 @@ import 'elements/modelx.dart'
LibraryElementX,
MetadataAnnotationX,
SetterElementX;
+import 'id_generator.dart';
import 'js_backend/js_backend.dart' show JavaScriptBackend;
import 'library_loader.dart' show LibraryLoader;
import 'options.dart' show ParserOptions;
@@ -176,9 +177,8 @@ class PatchParserTask extends CompilerTask {
// TODO(johnniwinther): Test that parts and exports are handled correctly.
Script script = compilationUnit.script;
Token tokens = new Scanner(script.file).tokenize();
- Function idGenerator = compiler.getNextFreeClassId;
Listener patchListener =
- new PatchElementListener(compiler, compilationUnit, idGenerator);
+ new PatchElementListener(compiler, compilationUnit, compiler);
try {
new PartialParser(patchListener, parserOptions).parseUnit(tokens);
} on ParserError catch (e) {
@@ -259,8 +259,8 @@ class PatchClassElementParser extends PartialParser {
class PatchElementListener extends ElementListener implements Listener {
final Compiler compiler;
- PatchElementListener(
- Compiler compiler, CompilationUnitElement patchElement, int idGenerator())
+ PatchElementListener(Compiler compiler, CompilationUnitElement patchElement,
+ IdGenerator idGenerator)
: this.compiler = compiler,
super(compiler.parsing.getScannerOptionsFor(patchElement),
compiler.reporter, patchElement, idGenerator);
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/compiler/lib/src/resolution/class_hierarchy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698