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

Side by Side Diff: lib/compiler/implementation/typechecker.dart

Issue 10392024: Add a "Label" Node around an Identifier that is being used as a label. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Only use Label nodes for label introductions. Include the colon. Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class TypeCheckerTask extends CompilerTask { 5 class TypeCheckerTask extends CompilerTask {
6 TypeCheckerTask(Compiler compiler) : super(compiler); 6 TypeCheckerTask(Compiler compiler) : super(compiler);
7 String get name() => "Type checker"; 7 String get name() => "Type checker";
8 8
9 static final bool LOG_FAILURES = false; 9 static final bool LOG_FAILURES = false;
10 10
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 visitContinueStatement(ContinueStatement node) { 696 visitContinueStatement(ContinueStatement node) {
697 return StatementType.NOT_RETURNING; 697 return StatementType.NOT_RETURNING;
698 } 698 }
699 699
700 visitForIn(ForIn node) { 700 visitForIn(ForIn node) {
701 analyze(node.expression); 701 analyze(node.expression);
702 StatementType bodyType = analyze(node.body); 702 StatementType bodyType = analyze(node.body);
703 return bodyType.join(StatementType.NOT_RETURNING); 703 return bodyType.join(StatementType.NOT_RETURNING);
704 } 704 }
705 705
706 visitLabel(Label node) {
707 fail(node);
ahe 2012/05/10 11:52:30 No need to fail here. Just do nothing.
Lasse Reichstein Nielsen 2012/05/10 12:14:20 Done. Why do we need to fail in the cases below?
ahe 2012/05/10 12:40:25 Ask Karl. The cases below are not implemented so t
708 }
709
706 visitLabeledStatement(LabeledStatement node) { 710 visitLabeledStatement(LabeledStatement node) {
707 return node.statement.accept(this); 711 return node.statement.accept(this);
708 } 712 }
709 713
710 visitLiteralMap(LiteralMap node) { 714 visitLiteralMap(LiteralMap node) {
711 fail(node); 715 fail(node);
712 } 716 }
713 717
714 visitLiteralMapEntry(LiteralMapEntry node) { 718 visitLiteralMapEntry(LiteralMapEntry node) {
715 fail(node); 719 fail(node);
(...skipping 20 matching lines...) Expand all
736 } 740 }
737 741
738 visitCatchBlock(CatchBlock node) { 742 visitCatchBlock(CatchBlock node) {
739 fail(node); 743 fail(node);
740 } 744 }
741 745
742 visitTypedef(Typedef node) { 746 visitTypedef(Typedef node) {
743 fail(node); 747 fail(node);
744 } 748 }
745 } 749 }
OLDNEW
« lib/compiler/implementation/tree/nodes.dart ('K') | « lib/compiler/implementation/tree/visitors.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698