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

Side by Side Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 2282233002: Add support for parsing, but not capturing, assers in constructor initializer lists (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: add flag 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 4105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4116 @override 4116 @override
4117 void internalPerform() { 4117 void internalPerform() {
4118 Source source = getRequiredSource(); 4118 Source source = getRequiredSource();
4119 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); 4119 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME);
4120 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); 4120 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME);
4121 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); 4121 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME);
4122 4122
4123 RecordingErrorListener errorListener = new RecordingErrorListener(); 4123 RecordingErrorListener errorListener = new RecordingErrorListener();
4124 Parser parser = new Parser(source, errorListener); 4124 Parser parser = new Parser(source, errorListener);
4125 AnalysisOptions options = context.analysisOptions; 4125 AnalysisOptions options = context.analysisOptions;
4126 parser.enableAssertInitializer = options.enableAssertInitializer;
4126 parser.parseAsync = options.enableAsync; 4127 parser.parseAsync = options.enableAsync;
4127 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); 4128 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source);
4128 parser.parseGenericMethods = options.enableGenericMethods; 4129 parser.parseGenericMethods = options.enableGenericMethods;
4129 parser.parseGenericMethodComments = options.strongMode; 4130 parser.parseGenericMethodComments = options.strongMode;
4130 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); 4131 CompilationUnit unit = parser.parseCompilationUnit(tokenStream);
4131 unit.lineInfo = lineInfo; 4132 unit.lineInfo = lineInfo;
4132 4133
4133 bool hasNonPartOfDirective = false; 4134 bool hasNonPartOfDirective = false;
4134 bool hasPartOfDirective = false; 4135 bool hasPartOfDirective = false;
4135 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); 4136 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>();
(...skipping 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after
6667 6668
6668 @override 6669 @override
6669 bool moveNext() { 6670 bool moveNext() {
6670 if (_newSources.isEmpty) { 6671 if (_newSources.isEmpty) {
6671 return false; 6672 return false;
6672 } 6673 }
6673 currentTarget = _newSources.removeLast(); 6674 currentTarget = _newSources.removeLast();
6674 return true; 6675 return true;
6675 } 6676 }
6676 } 6677 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698