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

Unified Diff: lib/src/dart_parser.dart

Issue 55143003: webui fixes for 0.8.9 (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 2 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: lib/src/dart_parser.dart
diff --git a/lib/src/dart_parser.dart b/lib/src/dart_parser.dart
index 3076eb65e2acacf04e4790a9d4fe256556f364b8..45f65793f16ac8197bdf49ba487d6fbac0b5f991 100644
--- a/lib/src/dart_parser.dart
+++ b/lib/src/dart_parser.dart
@@ -7,16 +7,12 @@
*/
library dart_parser;
-import 'dart:utf';
-import 'dart:math' as math;
import 'package:analyzer_experimental/src/generated/ast.dart';
import 'package:analyzer_experimental/src/generated/error.dart';
import 'package:analyzer_experimental/src/generated/parser.dart';
import 'package:analyzer_experimental/src/generated/scanner.dart';
import 'package:source_maps/span.dart' show SourceFile, SourceFileSegment, Location;
-import 'info.dart';
import 'messages.dart';
-import 'refactor.dart' show $CR, $LF;
import 'utils.dart';
/** Information extracted from a source Dart file. */
@@ -110,7 +106,7 @@ DartCodeInfo parseDartCode(String path, String code, Messages messages,
// Normalize the library URI.
var uriNode = directive.uri;
if (uriNode is! SimpleStringLiteral) {
- String uri = uriNode.accept(new ConstantEvaluator(null));
+ String uri = uriNode.accept(new ConstantEvaluator());
directive.uri = createStringLiteral(uri);
}
directives.add(directive);
@@ -142,20 +138,20 @@ CompilationUnit parseCompilationUnit(String code, {String path,
// once analyzer is fixed.
// TODO(sigmund): once we enable this, we need to fix compiler.dart to clear
// out the output of the compiler if we see compilation errors.
- if (false) {
- var file = new SourceFile.text(path, code);
- for (var e in errorListener.errors) {
- var span = file.span(e.offset, e.offset + e.length);
-
- var severity = e.errorCode.errorSeverity;
- if (severity == ErrorSeverity.ERROR) {
- messages.error(e.message, span);
- } else {
- assert(severity == ErrorSeverity.WARNING);
- messages.warning(e.message, span);
- }
- }
- }
+ // if (false) {
+ // var file = new SourceFile.text(path, code);
+ // for (var e in errorListener.errors) {
+ // var span = file.span(e.offset, e.offset + e.length);
+ //
+ // var severity = e.errorCode.errorSeverity;
+ // if (severity == ErrorSeverity.ERROR) {
+ // messages.error(e.message, span);
+ // } else {
+ // assert(severity == ErrorSeverity.WARNING);
+ // messages.warning(e.message, span);
+ // }
+ // }
+ // }
return unit;
}
« no previous file with comments | « lib/src/code_printer.dart ('k') | lib/src/file_system/console.dart » ('j') | pubspec.yaml » ('J')

Powered by Google App Engine
This is Rietveld 408576698