| 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:async'; | 5 import 'dart:async'; |
| 6 import 'dart:convert'; | 6 import 'dart:convert'; |
| 7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 fasta.ScannerResult scanResult = fasta.scan(_contentBytes, | 388 fasta.ScannerResult scanResult = fasta.scan(_contentBytes, |
| 389 includeComments: true, | 389 includeComments: true, |
| 390 scanGenericMethodComments: analysisOptions.strongMode); | 390 scanGenericMethodComments: analysisOptions.strongMode); |
| 391 | 391 |
| 392 var astBuilder = new fasta.AstBuilder( | 392 var astBuilder = new fasta.AstBuilder( |
| 393 new ErrorReporter(errorListener, source), | 393 new ErrorReporter(errorListener, source), |
| 394 null, | 394 null, |
| 395 null, | 395 null, |
| 396 new _FastaElementStoreProxy(), | 396 new _FastaElementStoreProxy(), |
| 397 new fasta.Scope.top(isModifiable: true), | 397 new fasta.Scope.top(isModifiable: true), |
| 398 true, |
| 398 uri); | 399 uri); |
| 399 astBuilder.parseGenericMethodComments = analysisOptions.strongMode; | 400 astBuilder.parseGenericMethodComments = analysisOptions.strongMode; |
| 400 | 401 |
| 401 var parser = new fasta.Parser(astBuilder); | 402 var parser = new fasta.Parser(astBuilder); |
| 402 astBuilder.parser = parser; | 403 astBuilder.parser = parser; |
| 403 parser.parseUnit(scanResult.tokens); | 404 parser.parseUnit(scanResult.tokens); |
| 404 var unit = astBuilder.pop() as CompilationUnit; | 405 var unit = astBuilder.pop() as CompilationUnit; |
| 405 | 406 |
| 406 LineInfo lineInfo = new LineInfo(scanResult.lineStarts); | 407 LineInfo lineInfo = new LineInfo(scanResult.lineStarts); |
| 407 unit.lineInfo = lineInfo; | 408 unit.lineInfo = lineInfo; |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 _FastaElementProxy operator [](fasta.Builder builder) => | 932 _FastaElementProxy operator [](fasta.Builder builder) => |
| 932 _elements.putIfAbsent(builder, () => new _FastaElementProxy()); | 933 _elements.putIfAbsent(builder, () => new _FastaElementProxy()); |
| 933 | 934 |
| 934 @override | 935 @override |
| 935 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 936 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 936 } | 937 } |
| 937 | 938 |
| 938 class _FastaInterfaceTypeProxy implements fasta.KernelInterfaceType { | 939 class _FastaInterfaceTypeProxy implements fasta.KernelInterfaceType { |
| 939 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 940 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 940 } | 941 } |
| OLD | NEW |