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

Side by Side Diff: frog/leg/tree/nodes.dart

Issue 9166010: Implement super calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 11 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 interface Visitor<R> { 5 interface Visitor<R> {
6 R visitBlock(Block node); 6 R visitBlock(Block node);
7 R visitBreakStatement(BreakStatement node); 7 R visitBreakStatement(BreakStatement node);
8 R visitCatchBlock(CatchBlock node); 8 R visitCatchBlock(CatchBlock node);
9 R visitClassNode(ClassNode node); 9 R visitClassNode(ClassNode node);
10 R visitConditional(Conditional node); 10 R visitConditional(Conditional node);
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 class Identifier extends Expression { 649 class Identifier extends Expression {
650 final Token token; 650 final Token token;
651 651
652 SourceString get source() => token.value; 652 SourceString get source() => token.value;
653 653
654 Identifier(Token this.token); 654 Identifier(Token this.token);
655 Identifier.synthetic(String name) : token = new StringToken(null, name, null); 655 Identifier.synthetic(String name) : token = new StringToken(null, name, null);
656 656
657 bool isThis() => source.stringValue == 'this'; 657 bool isThis() => source.stringValue == 'this';
658 658
659 bool isSuper() => source.stringValue == 'super';
660
659 Identifier asIdentifier() => this; 661 Identifier asIdentifier() => this;
660 662
661 accept(Visitor visitor) => visitor.visitIdentifier(this); 663 accept(Visitor visitor) => visitor.visitIdentifier(this);
662 664
663 visitChildren(Visitor visitor) {} 665 visitChildren(Visitor visitor) {}
664 666
665 Token getBeginToken() => token; 667 Token getBeginToken() => token;
666 668
667 Token getEndToken() => token; 669 Token getEndToken() => token;
668 } 670 }
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 1237
1236 visitChildren(Visitor visitor) { 1238 visitChildren(Visitor visitor) {
1237 formals.accept(visitor); 1239 formals.accept(visitor);
1238 block.accept(visitor); 1240 block.accept(visitor);
1239 } 1241 }
1240 1242
1241 Token getBeginToken() => catchKeyword; 1243 Token getBeginToken() => catchKeyword;
1242 1244
1243 Token getEndToken() => block.getEndToken(); 1245 Token getEndToken() => block.getEndToken();
1244 } 1246 }
OLDNEW
« frog/leg/ssa/tracer.dart ('K') | « frog/leg/ssa/tracer.dart ('k') | frog/leg/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698