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

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

Issue 2112073002: Option to enable analyzer trailing comma support (#26647). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Option to enable analyzer trailing comma support (#26647). Created 4 years, 5 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 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after
3965 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); 3965 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME);
3966 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); 3966 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME);
3967 3967
3968 RecordingErrorListener errorListener = new RecordingErrorListener(); 3968 RecordingErrorListener errorListener = new RecordingErrorListener();
3969 Parser parser = new Parser(source, errorListener); 3969 Parser parser = new Parser(source, errorListener);
3970 AnalysisOptions options = context.analysisOptions; 3970 AnalysisOptions options = context.analysisOptions;
3971 parser.parseAsync = options.enableAsync; 3971 parser.parseAsync = options.enableAsync;
3972 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); 3972 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source);
3973 parser.parseGenericMethods = options.enableGenericMethods; 3973 parser.parseGenericMethods = options.enableGenericMethods;
3974 parser.parseGenericMethodComments = options.strongMode; 3974 parser.parseGenericMethodComments = options.strongMode;
3975 parser.parseTrailingCommas = options.enableTrailingCommas;
3975 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); 3976 CompilationUnit unit = parser.parseCompilationUnit(tokenStream);
3976 unit.lineInfo = lineInfo; 3977 unit.lineInfo = lineInfo;
3977 3978
3978 bool hasNonPartOfDirective = false; 3979 bool hasNonPartOfDirective = false;
3979 bool hasPartOfDirective = false; 3980 bool hasPartOfDirective = false;
3980 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); 3981 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>();
3981 HashSet<Source> exportedSourceSet = new HashSet<Source>(); 3982 HashSet<Source> exportedSourceSet = new HashSet<Source>();
3982 HashSet<Source> includedSourceSet = new HashSet<Source>(); 3983 HashSet<Source> includedSourceSet = new HashSet<Source>();
3983 NodeList<Directive> directives = unit.directives; 3984 NodeList<Directive> directives = unit.directives;
3984 int length = directives.length; 3985 int length = directives.length;
(...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after
6435 6436
6436 @override 6437 @override
6437 bool moveNext() { 6438 bool moveNext() {
6438 if (_newSources.isEmpty) { 6439 if (_newSources.isEmpty) {
6439 return false; 6440 return false;
6440 } 6441 }
6441 currentTarget = _newSources.removeLast(); 6442 currentTarget = _newSources.removeLast();
6442 return true; 6443 return true;
6443 } 6444 }
6444 } 6445 }
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