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

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

Issue 2361433002: Async is no longer optional (Closed)
Patch Set: Created 4 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/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 182b2a0e03663666725db1a2b60b7ea99e2f0df8..ab91b3d57119e48531b7befa2827ae147bd4bc80 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -226,11 +226,6 @@ class Parser {
bool _enableNnbd = false;
/**
- * A flag indicating whether the parser is to parse the async support.
- */
- bool _parseAsync = true;
-
- /**
* A flag indicating whether parser is to parse function bodies.
*/
bool _parseFunctionBodies = true;
@@ -342,10 +337,11 @@ class Parser {
/**
* Set whether the parser is to parse the async support.
+ *
+ * Support for removing the 'async' library has been removed.
*/
- void set parseAsync(bool parseAsync) {
- this._parseAsync = parseAsync;
- }
+ @deprecated
+ void set parseAsync(bool parseAsync) {}
@deprecated
bool get parseConditionalDirectives => true;
@@ -3067,9 +3063,6 @@ class Parser {
if (lexeme == ASYNC) {
foundAsync = true;
keyword = getAndAdvance();
- if (!_parseAsync) {
- _reportErrorForToken(ParserErrorCode.ASYNC_NOT_SUPPORTED, keyword);
- }
if (_matches(TokenType.STAR)) {
star = getAndAdvance();
_inGenerator = true;
@@ -3079,9 +3072,6 @@ class Parser {
} else if (lexeme == SYNC) {
foundSync = true;
keyword = getAndAdvance();
- if (!_parseAsync) {
- _reportErrorForToken(ParserErrorCode.ASYNC_NOT_SUPPORTED, keyword);
- }
if (_matches(TokenType.STAR)) {
star = getAndAdvance();
_inGenerator = true;
@@ -7315,7 +7305,6 @@ class Parser {
parser._inInitializer = _inInitializer;
parser._inLoop = _inLoop;
parser._inSwitch = _inSwitch;
- parser._parseAsync = _parseAsync;
parser._parseFunctionBodies = _parseFunctionBodies;
try {
parseOperation(parser);
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698