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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 ); | 581 ); |
582 }); | 582 }); |
583 | 583 |
584 var astBuilder = new fasta.AstBuilder( | 584 var astBuilder = new fasta.AstBuilder( |
585 new ErrorReporter(errorListener, source), | 585 new ErrorReporter(errorListener, source), |
586 null, | 586 null, |
587 null, | 587 null, |
588 new _FastaElementStoreProxy(), | 588 new _FastaElementStoreProxy(), |
589 new fasta.Scope.top(isModifiable: true), | 589 new fasta.Scope.top(isModifiable: true), |
590 true, | 590 true, |
| 591 false, |
591 uri); | 592 uri); |
592 astBuilder.parseGenericMethodComments = analysisOptions.strongMode; | 593 astBuilder.parseGenericMethodComments = analysisOptions.strongMode; |
593 | 594 |
594 var parser = new fasta.Parser(astBuilder); | 595 var parser = new fasta.Parser(astBuilder); |
595 astBuilder.parser = parser; | 596 astBuilder.parser = parser; |
596 parser.parseUnit(scanResult.tokens); | 597 parser.parseUnit(scanResult.tokens); |
597 var unit = astBuilder.pop() as CompilationUnit; | 598 var unit = astBuilder.pop() as CompilationUnit; |
598 | 599 |
599 LineInfo lineInfo = new LineInfo(scanResult.lineStarts); | 600 LineInfo lineInfo = new LineInfo(scanResult.lineStarts); |
600 unit.lineInfo = lineInfo; | 601 unit.lineInfo = lineInfo; |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 _FastaElementProxy operator [](fasta.Builder builder) => | 956 _FastaElementProxy operator [](fasta.Builder builder) => |
956 _elements.putIfAbsent(builder, () => new _FastaElementProxy()); | 957 _elements.putIfAbsent(builder, () => new _FastaElementProxy()); |
957 | 958 |
958 @override | 959 @override |
959 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 960 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
960 } | 961 } |
961 | 962 |
962 class _FastaInterfaceTypeProxy implements fasta.KernelInterfaceType { | 963 class _FastaInterfaceTypeProxy implements fasta.KernelInterfaceType { |
963 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 964 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
964 } | 965 } |
OLD | NEW |