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

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: Parsing correct syntax. 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 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { 1615 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) {
1616 visit(link.head); 1616 visit(link.head);
1617 } 1617 }
1618 } 1618 }
1619 1619
1620 visitOperator(Operator node) { 1620 visitOperator(Operator node) {
1621 unimplemented(node, 'operator'); 1621 unimplemented(node, 'operator');
1622 } 1622 }
1623 1623
1624 visitReturn(Return node) { 1624 visitReturn(Return node) {
1625 if (node.beginToken.stringValue === '=') {
1626 NewExpression newExpression = node.expression;
1627 visit(newExpression);
1628 unimplemented(node, 'redirecting constructors');
1629 }
1625 visit(node.expression); 1630 visit(node.expression);
1626 } 1631 }
1627 1632
1628 visitThrow(Throw node) { 1633 visitThrow(Throw node) {
1629 visit(node.expression); 1634 visit(node.expression);
1630 } 1635 }
1631 1636
1632 visitVariableDefinitions(VariableDefinitions node) { 1637 visitVariableDefinitions(VariableDefinitions node) {
1633 visit(node.type); 1638 visit(node.type);
1634 VariableDefinitionsVisitor visitor = 1639 VariableDefinitionsVisitor visitor =
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2875 2880
2876 Element localLookup(SourceString name) => library.find(name); 2881 Element localLookup(SourceString name) => library.find(name);
2877 Element lookup(SourceString name) => localLookup(name); 2882 Element lookup(SourceString name) => localLookup(name);
2878 Element lexicalLookup(SourceString name) => localLookup(name); 2883 Element lexicalLookup(SourceString name) => localLookup(name);
2879 2884
2880 Element add(Element newElement) { 2885 Element add(Element newElement) {
2881 throw "Cannot add an element in the top scope"; 2886 throw "Cannot add an element in the top scope";
2882 } 2887 }
2883 String toString() => '$element'; 2888 String toString() => '$element';
2884 } 2889 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/parser.dart » ('j') | lib/compiler/implementation/scanner/parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698