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

Side by Side Diff: pkg/analyzer/lib/src/generated/parser_fasta.dart

Issue 2981693002: Start copying resolution/inference data from front end to analyzer ASTs. (Closed)
Patch Set: Address code review comments. Created 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 part of analyzer.parser; 5 part of analyzer.parser;
6 6
7 class _Builder implements Builder { 7 class _Builder implements Builder {
8 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 8 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
9 } 9 }
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 final Source _source; 48 final Source _source;
49 49
50 factory _Parser2(Source source, AnalysisErrorListener errorListener) { 50 factory _Parser2(Source source, AnalysisErrorListener errorListener) {
51 var errorReporter = new ErrorReporter(errorListener, source); 51 var errorReporter = new ErrorReporter(errorListener, source);
52 var library = new _KernelLibraryBuilder(source.uri); 52 var library = new _KernelLibraryBuilder(source.uri);
53 var member = new _Builder(); 53 var member = new _Builder();
54 var elementStore = new _ElementStore(); 54 var elementStore = new _ElementStore();
55 var scope = new Scope.top(isModifiable: true); 55 var scope = new Scope.top(isModifiable: true);
56 56
57 AstBuilder astBuilder = new AstBuilder( 57 AstBuilder astBuilder = new AstBuilder(
58 errorReporter, library, member, elementStore, scope, true); 58 errorReporter, library, member, elementStore, scope, true, false);
59 fasta.Parser fastaParser = new fasta.Parser(astBuilder); 59 fasta.Parser fastaParser = new fasta.Parser(astBuilder);
60 astBuilder.parser = fastaParser; 60 astBuilder.parser = fastaParser;
61 return new _Parser2._(source, fastaParser, astBuilder); 61 return new _Parser2._(source, fastaParser, astBuilder);
62 } 62 }
63 63
64 _Parser2._(this._source, this._fastaParser, this._astBuilder); 64 _Parser2._(this._source, this._fastaParser, this._astBuilder);
65 65
66 @override 66 @override
67 bool get parseGenericMethodComments => _astBuilder.parseGenericMethodComments; 67 bool get parseGenericMethodComments => _astBuilder.parseGenericMethodComments;
68 68
69 @override 69 @override
70 set parseGenericMethodComments(bool value) { 70 set parseGenericMethodComments(bool value) {
71 _astBuilder.parseGenericMethodComments = value; 71 _astBuilder.parseGenericMethodComments = value;
72 } 72 }
73 73
74 @override 74 @override
75 CompilationUnit parseCompilationUnit(Token token) { 75 CompilationUnit parseCompilationUnit(Token token) {
76 currentToken = token; 76 currentToken = token;
77 return parseCompilationUnit2(); 77 return parseCompilationUnit2();
78 } 78 }
79 79
80 @override 80 @override
81 CompilationUnit parseCompilationUnit2() { 81 CompilationUnit parseCompilationUnit2() {
82 currentToken = _fastaParser.parseUnit(currentToken); 82 currentToken = _fastaParser.parseUnit(currentToken);
83 return _astBuilder.pop(); 83 return _astBuilder.pop();
84 } 84 }
85 85
86 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 86 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
87 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698