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

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

Issue 9838038: "Implement" #resource tag and various restrictions on library definitions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add #import tags. Created 8 years, 9 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
ahe 2012/03/24 08:40:14 Changes in this file only due to updating.
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);
11 R visitContinueStatement(ContinueStatement node); 11 R visitContinueStatement(ContinueStatement node);
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 1473
1474 final Token beginToken; 1474 final Token beginToken;
1475 final Token endToken; 1475 final Token endToken;
1476 1476
1477 ScriptTag(this.tag, this.argument, this.prefixIdentifier, this.prefix, 1477 ScriptTag(this.tag, this.argument, this.prefixIdentifier, this.prefix,
1478 this.beginToken, this.endToken); 1478 this.beginToken, this.endToken);
1479 1479
1480 bool isImport() => tag.source == const SourceString("import"); 1480 bool isImport() => tag.source == const SourceString("import");
1481 bool isSource() => tag.source == const SourceString("source"); 1481 bool isSource() => tag.source == const SourceString("source");
1482 bool isLibrary() => tag.source == const SourceString("library"); 1482 bool isLibrary() => tag.source == const SourceString("library");
1483 bool isResource() => tag.source == const SourceString("resource");
1483 1484
1484 ScriptTag asScriptTag() => this; 1485 ScriptTag asScriptTag() => this;
1485 1486
1486 accept(Visitor visitor) => visitor.visitScriptTag(this); 1487 accept(Visitor visitor) => visitor.visitScriptTag(this);
1487 1488
1488 visitChildren(Visitor visitor) { 1489 visitChildren(Visitor visitor) {
1489 tag.accept(visitor); 1490 tag.accept(visitor);
1490 argument.accept(visitor); 1491 argument.accept(visitor);
1491 if (prefixIdentifier !== null) prefixIdentifier.accept(visitor); 1492 if (prefixIdentifier !== null) prefixIdentifier.accept(visitor);
1492 if (prefix !== null) prefix.accept(visitor); 1493 if (prefix !== null) prefix.accept(visitor);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 * argument). 1635 * argument).
1635 * 1636 *
1636 * TODO(ahe): This method is controversial, the team needs to discuss 1637 * TODO(ahe): This method is controversial, the team needs to discuss
1637 * if top-level methods are acceptable and what naming conventions to 1638 * if top-level methods are acceptable and what naming conventions to
1638 * use. 1639 * use.
1639 */ 1640 */
1640 initializerDo(Node node, f(Node node)) { 1641 initializerDo(Node node, f(Node node)) {
1641 SendSet send = node.asSendSet(); 1642 SendSet send = node.asSendSet();
1642 if (send !== null) return f(send.arguments.head); 1643 if (send !== null) return f(send.arguments.head);
1643 } 1644 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698