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

Side by Side Diff: pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart

Issue 2704753002: Implement line and column numbers. (Closed)
Patch Set: Change message. Created 3 years, 10 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/front_end/lib/src/fasta/bin/run.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 library fasta.analyzer.ast_builder; 5 library fasta.analyzer.ast_builder;
6 6
7 import 'package:front_end/src/fasta/scanner/token.dart' 7 import 'package:front_end/src/fasta/scanner/token.dart'
8 show BeginGroupToken, Token; 8 show BeginGroupToken, Token;
9 9
10 import 'package:analyzer/analyzer.dart'; 10 import 'package:analyzer/analyzer.dart';
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 final AstFactory ast = standard.astFactory; 46 final AstFactory ast = standard.astFactory;
47 47
48 final KernelLibraryBuilder library; 48 final KernelLibraryBuilder library;
49 49
50 final Builder member; 50 final Builder member;
51 51
52 final ElementStore elementStore; 52 final ElementStore elementStore;
53 53
54 bool isFirstIdentifier = false; 54 bool isFirstIdentifier = false;
55 55
56 AstBuilder(this.library, this.member, this.elementStore, Scope scope) 56 @override
57 : super(scope); 57 final Uri uri;
58 58
59 Uri get uri => library.fileUri ?? library.uri; 59 AstBuilder(this.library, this.member, this.elementStore, Scope scope,
60 [Uri uri])
61 : uri = uri ?? library.fileUri, super(scope);
60 62
61 createJumpTarget(JumpTargetKind kind, int charOffset) { 63 createJumpTarget(JumpTargetKind kind, int charOffset) {
62 // TODO(ahe): Implement jump targets. 64 // TODO(ahe): Implement jump targets.
63 return null; 65 return null;
64 } 66 }
65 67
66 void beginLiteralString(Token token) { 68 void beginLiteralString(Token token) {
67 debugEvent("beginLiteralString"); 69 debugEvent("beginLiteralString");
68 push(token); 70 push(token);
69 } 71 }
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 push(ast.showCombinator(toAnalyzerToken(showKeyword), shownNames)); 725 push(ast.showCombinator(toAnalyzerToken(showKeyword), shownNames));
724 } 726 }
725 727
726 @override 728 @override
727 void endHide(Token hideKeyword) { 729 void endHide(Token hideKeyword) {
728 debugEvent("Hide"); 730 debugEvent("Hide");
729 List<SimpleIdentifier> hiddenNames = pop(); 731 List<SimpleIdentifier> hiddenNames = pop();
730 push(ast.hideCombinator(toAnalyzerToken(hideKeyword), hiddenNames)); 732 push(ast.hideCombinator(toAnalyzerToken(hideKeyword), hiddenNames));
731 } 733 }
732 } 734 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/bin/run.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698