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

Unified Diff: pkg/analyzer/lib/src/generated/html.dart

Issue 1045553002: Implement the new '??' operator in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix if_null_precedence_test for unchecked operation. Created 5 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
Index: pkg/analyzer/lib/src/generated/html.dart
diff --git a/pkg/analyzer/lib/src/generated/html.dart b/pkg/analyzer/lib/src/generated/html.dart
index c8cc1d32f77cd2426251bc88e0221008cfd52e63..c6ad0e0f63ad9f2268fe05d84a7ed48ef3c917e1 100644
--- a/pkg/analyzer/lib/src/generated/html.dart
+++ b/pkg/analyzer/lib/src/generated/html.dart
@@ -11,7 +11,7 @@ import 'dart:collection';
import 'ast.dart';
import 'element.dart';
-import 'engine.dart' show AnalysisEngine;
+import 'engine.dart' show AnalysisOptions, AnalysisEngine;
import 'error.dart' show AnalysisErrorListener;
import 'java_core.dart';
import 'java_engine.dart';
@@ -388,13 +388,16 @@ class HtmlParser extends XmlParser {
*/
final AnalysisErrorListener _errorListener;
+ final AnalysisOptions _options;
+
/**
* Construct a parser for the specified source.
*
- * @param source the source being parsed
- * @param errorListener the error listener to which errors will be reported
+ * [source] is the source being parsed. [_errorListener] is the error
+ * listener to which errors will be reported. [_options] is the analysis
+ * options which should be used for parsing.
*/
- HtmlParser(Source source, this._errorListener) : super(source);
+ HtmlParser(Source source, this._errorListener, this._options) : super(source);
@override
XmlAttributeNode createAttributeNode(Token name, Token equals, Token value) =>
@@ -413,6 +416,7 @@ class HtmlParser extends XmlParser {
LineInfo_Location location = _lineInfo.getLocation(contentOffset);
sc.Scanner scanner = new sc.Scanner(source,
new sc.SubSequenceReader(contents, contentOffset), _errorListener);
+ scanner.enableNullAwareOperators = _options.enableNullAwareOperators;
scanner.setSourceStart(location.lineNumber, location.columnNumber);
sc.Token firstToken = scanner.tokenize();
Parser parser = new Parser(source, _errorListener);
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698