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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/diet_listener.dart

Issue 2828253003: Add top level type inference logic for integer literals. (Closed)
Patch Set: Clean up, bug fix, and remove unintentional expectations changes Created 3 years, 8 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.diet_listener; 5 library fasta.diet_listener;
6 6
7 import 'package:front_end/src/fasta/kernel/kernel_ast_factory.dart' 7 import 'package:front_end/src/fasta/kernel/kernel_ast_factory.dart'
8 show KernelAstFactory; 8 show KernelAstFactory;
9 9
10 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart' 10 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart'
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void endMixinApplication(Token withKeyword) { 128 void endMixinApplication(Token withKeyword) {
129 debugEvent("MixinApplication"); 129 debugEvent("MixinApplication");
130 } 130 }
131 131
132 @override 132 @override
133 void endTypeArguments(int count, Token beginToken, Token endToken) { 133 void endTypeArguments(int count, Token beginToken, Token endToken) {
134 debugEvent("TypeArguments"); 134 debugEvent("TypeArguments");
135 } 135 }
136 136
137 @override 137 @override
138 void endFieldInitializer(Token assignmentOperator) { 138 void endFieldInitializer(Token assignmentOperator, Token token) {
139 debugEvent("FieldInitializer"); 139 debugEvent("FieldInitializer");
140 } 140 }
141 141
142 @override 142 @override
143 void handleNoFieldInitializer(Token token) { 143 void handleNoFieldInitializer(Token token) {
144 debugEvent("NoFieldInitializer"); 144 debugEvent("NoFieldInitializer");
145 } 145 }
146 146
147 @override 147 @override
148 void handleNoTypeVariables(Token token) { 148 void handleNoTypeVariables(Token token) {
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 builder.computeFormalParameterScope(typeParameterScope); 414 builder.computeFormalParameterScope(typeParameterScope);
415 assert(typeParameterScope != null); 415 assert(typeParameterScope != null);
416 assert(formalParameterScope != null); 416 assert(formalParameterScope != null);
417 parseFunctionBody( 417 parseFunctionBody(
418 createListener(builder, typeParameterScope, builder.isInstanceMember, 418 createListener(builder, typeParameterScope, builder.isInstanceMember,
419 formalParameterScope), 419 formalParameterScope),
420 token); 420 token);
421 } 421 }
422 422
423 void buildFields(Token token, bool isTopLevel, MemberBuilder builder) { 423 void buildFields(Token token, bool isTopLevel, MemberBuilder builder) {
424 // TODO(paulberry): don't re-parse the field if we've already parsed it
425 // for type inference.
424 parseFields(createListener(builder, memberScope, builder.isInstanceMember), 426 parseFields(createListener(builder, memberScope, builder.isInstanceMember),
425 token, isTopLevel); 427 token, isTopLevel);
426 } 428 }
427 429
428 @override 430 @override
429 void endMember() { 431 void endMember() {
430 debugEvent("Member"); 432 debugEvent("Member");
431 checkEmpty(-1); 433 checkEmpty(-1);
432 } 434 }
433 435
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 bool get isTargetingDartVm { 571 bool get isTargetingDartVm {
570 // TODO(ahe): Find a more reliable way to check if this is the Dart VM. 572 // TODO(ahe): Find a more reliable way to check if this is the Dart VM.
571 return !coreTypes.containsLibrary("dart:_js_helper"); 573 return !coreTypes.containsLibrary("dart:_js_helper");
572 } 574 }
573 575
574 @override 576 @override
575 void debugEvent(String name) { 577 void debugEvent(String name) {
576 // printEvent(name); 578 // printEvent(name);
577 } 579 }
578 } 580 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698