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

Unified Diff: dart/frog/leg/tree/nodes.dart

Issue 9309061: Implement script tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: dart/frog/leg/tree/nodes.dart
diff --git a/dart/frog/leg/tree/nodes.dart b/dart/frog/leg/tree/nodes.dart
index 96dc124e36c3999eeddfb75b6c4a1c9a26540a08..52d565e0573efe42c8eb68b95b23a595132576fa 100644
--- a/dart/frog/leg/tree/nodes.dart
+++ b/dart/frog/leg/tree/nodes.dart
@@ -1356,6 +1356,10 @@ class ScriptTag extends Node {
ScriptTag(this.tag, this.argument, this.prefixIdentifier, this.prefix,
this.beginToken, this.endToken);
+ bool isImport() => tag.source == const SourceString("import");
+ bool isSource() => tag.source == const SourceString("source");
+ bool isLibrary() => tag.source == const SourceString("library");
+
ScriptTag asScriptTag() => this;
accept(Visitor visitor) => visitor.visitScriptTag(this);

Powered by Google App Engine
This is Rietveld 408576698