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

Unified Diff: pkg/compiler/lib/src/scanner/parser_task.dart

Issue 1313073007: Move parser and token related libraries into their own subfolder. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix unittests and try Created 5 years, 3 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/compiler/lib/src/scanner/parser.dart ('k') | pkg/compiler/lib/src/scanner/partial_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/scanner/parser_task.dart
diff --git a/pkg/compiler/lib/src/scanner/parser_task.dart b/pkg/compiler/lib/src/scanner/parser_task.dart
deleted file mode 100644
index 6e0ea4cd61f1ef6867903bf98f655fc666c5f742..0000000000000000000000000000000000000000
--- a/pkg/compiler/lib/src/scanner/parser_task.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2011, the Dart 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 file.
-
-library dart2js.parser.task;
-
-import '../common/tasks.dart' show
- CompilerTask;
-import '../compiler.dart' show
- Compiler;
-import '../diagnostics/invariant.dart' show
- invariant;
-import '../elements/modelx.dart' show
- ElementX;
-import '../tree/tree.dart' show
- Node;
-
-import 'listener.dart' show
- NodeListener,
- ParserError;
-import 'parser.dart' show
- Parser;
-import 'token.dart' show
- Token;
-
-class ParserTask extends CompilerTask {
- ParserTask(Compiler compiler) : super(compiler);
- String get name => 'Parser';
-
- Node parse(ElementX element) {
- return measure(() => element.parseNode(compiler));
- }
-
- Node parseCompilationUnit(Token token) {
- return measure(() {
- NodeListener listener = new NodeListener(compiler, null);
- Parser parser = new Parser(listener);
- try {
- parser.parseUnit(token);
- } on ParserError catch(_) {
- assert(invariant(token, compiler.compilationFailed));
- return listener.makeNodeList(0, null, null, '\n');
- }
- Node result = listener.popNode();
- assert(listener.nodes.isEmpty);
- return result;
- });
- }
-}
« no previous file with comments | « pkg/compiler/lib/src/scanner/parser.dart ('k') | pkg/compiler/lib/src/scanner/partial_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698