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

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

Issue 2743633003: [fasta] Add and correct more offsets (Closed)
Patch Set: variable.name might be null Created 3 years, 9 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) 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:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory; 8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory;
9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard; 9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard;
10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token; 10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 void handleStringPart(Token token) { 106 void handleStringPart(Token token) {
107 debugEvent("StringPart"); 107 debugEvent("StringPart");
108 push(token); 108 push(token);
109 } 109 }
110 110
111 void doStringPart(Token token) { 111 void doStringPart(Token token) {
112 push(ast.simpleStringLiteral(toAnalyzerToken(token), token.value)); 112 push(ast.simpleStringLiteral(toAnalyzerToken(token), token.value));
113 } 113 }
114 114
115 void endLiteralString(int interpolationCount) { 115 void endLiteralString(int interpolationCount, Token endToken) {
116 debugEvent("endLiteralString"); 116 debugEvent("endLiteralString");
117 if (interpolationCount == 0) { 117 if (interpolationCount == 0) {
118 Token token = pop(); 118 Token token = pop();
119 String value = unescapeString(token.value); 119 String value = unescapeString(token.value);
120 push(ast.simpleStringLiteral(toAnalyzerToken(token), value)); 120 push(ast.simpleStringLiteral(toAnalyzerToken(token), value));
121 } else { 121 } else {
122 List parts = popList(1 + interpolationCount * 2); 122 List parts = popList(1 + interpolationCount * 2);
123 Token first = parts.first; 123 Token first = parts.first;
124 Token last = parts.last; 124 Token last = parts.last;
125 Quote quote = analyzeQuote(first.value); 125 Quote quote = analyzeQuote(first.value);
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 } else if (identical('static', s)) { 1514 } else if (identical('static', s)) {
1515 staticKeyword = token; 1515 staticKeyword = token;
1516 } else if (identical('var', s)) { 1516 } else if (identical('var', s)) {
1517 finalConstOrVarKeyword = token; 1517 finalConstOrVarKeyword = token;
1518 } else { 1518 } else {
1519 internalError('Unhandled modifier: $s'); 1519 internalError('Unhandled modifier: $s');
1520 } 1520 }
1521 } 1521 }
1522 } 1522 }
1523 } 1523 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698