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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2628143005: Fix assert constructor initializer tests. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | pkg/analyzer/test/generated/compile_time_error_code_driver_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:convert'; 5 import 'dart:convert';
6 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 7
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/dart/ast/token.dart'; 9 import 'package:analyzer/dart/ast/token.dart';
10 import 'package:analyzer/error/listener.dart'; 10 import 'package:analyzer/error/listener.dart';
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 CompilationUnit parse(AnalysisErrorListener errorListener) { 333 CompilationUnit parse(AnalysisErrorListener errorListener) {
334 AnalysisOptions analysisOptions = _fsState._analysisOptions; 334 AnalysisOptions analysisOptions = _fsState._analysisOptions;
335 335
336 CharSequenceReader reader = new CharSequenceReader(content); 336 CharSequenceReader reader = new CharSequenceReader(content);
337 Scanner scanner = new Scanner(source, reader, errorListener); 337 Scanner scanner = new Scanner(source, reader, errorListener);
338 scanner.scanGenericMethodComments = analysisOptions.strongMode; 338 scanner.scanGenericMethodComments = analysisOptions.strongMode;
339 Token token = scanner.tokenize(); 339 Token token = scanner.tokenize();
340 LineInfo lineInfo = new LineInfo(scanner.lineStarts); 340 LineInfo lineInfo = new LineInfo(scanner.lineStarts);
341 341
342 Parser parser = new Parser(source, errorListener); 342 Parser parser = new Parser(source, errorListener);
343 parser.enableAssertInitializer = analysisOptions.enableAssertInitializer;
343 parser.parseGenericMethodComments = analysisOptions.strongMode; 344 parser.parseGenericMethodComments = analysisOptions.strongMode;
344 CompilationUnit unit = parser.parseCompilationUnit(token); 345 CompilationUnit unit = parser.parseCompilationUnit(token);
345 unit.lineInfo = lineInfo; 346 unit.lineInfo = lineInfo;
346 return unit; 347 return unit;
347 } 348 }
348 349
349 /** 350 /**
350 * Read the file content and ensure that all of the file properties are 351 * Read the file content and ensure that all of the file properties are
351 * consistent with the read content, including API signature. 352 * consistent with the read content, including API signature.
352 * 353 *
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 .where((f) => f._transitiveFiles == null) 695 .where((f) => f._transitiveFiles == null)
695 .toSet(); 696 .toSet();
696 } 697 }
697 698
698 Set<FileState> get filesWithoutTransitiveSignature { 699 Set<FileState> get filesWithoutTransitiveSignature {
699 return state._uriToFile.values 700 return state._uriToFile.values
700 .where((f) => f._transitiveSignature == null) 701 .where((f) => f._transitiveSignature == null)
701 .toSet(); 702 .toSet();
702 } 703 }
703 } 704 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698