| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |