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

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

Issue 10957060: First stab at parsing redirecting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make a single begin/endRedirectingFactoryBody method in listener. Created 8 years, 2 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 abstract class TreeElements { 5 abstract class TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 DartType getType(TypeAnnotation annotation); 8 DartType getType(TypeAnnotation annotation);
9 bool isParameterChecked(Element element); 9 bool isParameterChecked(Element element);
10 } 10 }
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1620 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { 1620 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) {
1621 visit(link.head); 1621 visit(link.head);
1622 } 1622 }
1623 } 1623 }
1624 1624
1625 visitOperator(Operator node) { 1625 visitOperator(Operator node) {
1626 unimplemented(node, 'operator'); 1626 unimplemented(node, 'operator');
1627 } 1627 }
1628 1628
1629 visitReturn(Return node) { 1629 visitReturn(Return node) {
1630 if (node.beginToken.stringValue === '=') {
ahe 2012/09/26 14:51:09 I think we should have a method/getter for this.
Lasse Reichstein Nielsen 2012/09/27 11:50:59 Done.
1631 NewExpression newExpression = node.expression;
ahe 2012/09/26 14:51:09 I think we should just say that this is an error,
Lasse Reichstein Nielsen 2012/09/27 11:50:59 Done. No just calls unimplemented immediately.
1632 visit(newExpression);
1633 unimplemented(node, 'redirecting constructors');
1634 }
1630 visit(node.expression); 1635 visit(node.expression);
1631 } 1636 }
1632 1637
1633 visitThrow(Throw node) { 1638 visitThrow(Throw node) {
1634 visit(node.expression); 1639 visit(node.expression);
1635 } 1640 }
1636 1641
1637 visitVariableDefinitions(VariableDefinitions node) { 1642 visitVariableDefinitions(VariableDefinitions node) {
1638 visit(node.type); 1643 visit(node.type);
1639 VariableDefinitionsVisitor visitor = 1644 VariableDefinitionsVisitor visitor =
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2880 2885
2881 Element localLookup(SourceString name) => library.find(name); 2886 Element localLookup(SourceString name) => library.find(name);
2882 Element lookup(SourceString name) => localLookup(name); 2887 Element lookup(SourceString name) => localLookup(name);
2883 Element lexicalLookup(SourceString name) => localLookup(name); 2888 Element lexicalLookup(SourceString name) => localLookup(name);
2884 2889
2885 Element add(Element newElement) { 2890 Element add(Element newElement) {
2886 throw "Cannot add an element in the top scope"; 2891 throw "Cannot add an element in the top scope";
2887 } 2892 }
2888 String toString() => '$element'; 2893 String toString() => '$element';
2889 } 2894 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/listener.dart » ('j') | lib/compiler/implementation/scanner/listener.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698