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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/ast.dart

Issue 18612009: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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: pkg/analyzer_experimental/lib/src/generated/ast.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/ast.dart b/pkg/analyzer_experimental/lib/src/generated/ast.dart
index c4b45f40c8cb2a0d7b78320cda7a2dc7bbf706f2..3e2db618d22d89d34019bbf89b5beeebe78ce2f7 100644
--- a/pkg/analyzer_experimental/lib/src/generated/ast.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/ast.dart
@@ -19,6 +19,11 @@ import 'element.dart';
abstract class ASTNode {
/**
+ * An empty array of ast nodes.
+ */
+ static List<ASTNode> EMPTY_ARRAY = new List<ASTNode>(0);
+
+ /**
* The parent of the node, or `null` if the node is the root of an AST structure.
*/
ASTNode _parent;
@@ -312,6 +317,7 @@ abstract class ASTVisitor<R> {
R visitMethodDeclaration(MethodDeclaration node);
R visitMethodInvocation(MethodInvocation node);
R visitNamedExpression(NamedExpression node);
+ R visitNativeClause(NativeClause node);
R visitNativeFunctionBody(NativeFunctionBody node);
R visitNullLiteral(NullLiteral node);
R visitParenthesizedExpression(ParenthesizedExpression node);
@@ -2376,6 +2382,11 @@ class ClassDeclaration extends CompilationUnitMember {
ImplementsClause _implementsClause;
/**
+ * The native clause for the class, or `null` if the class does not have a native clause.
+ */
+ NativeClause _nativeClause;
+
+ /**
* The left curly bracket.
*/
Token _leftBracket;
@@ -2493,6 +2504,14 @@ class ClassDeclaration extends CompilationUnitMember {
SimpleIdentifier get name => _name;
/**
+ * Return the native clause for this class, or `null` if the class does not have a native
+ * cluse.
+ *
+ * @return the native clause for this class
+ */
+ NativeClause get nativeClause => _nativeClause;
+
+ /**
* Return the right curly bracket.
*
* @return the right curly bracket
@@ -2569,6 +2588,15 @@ class ClassDeclaration extends CompilationUnitMember {
}
/**
+ * Set the native clause for this class to the given clause.
+ *
+ * @param nativeClause the native clause for this class
+ */
+ void set nativeClause(NativeClause nativeClause2) {
+ this._nativeClause = nativeClause2;
+ }
+
+ /**
* Set the right curly bracket to the given token.
*
* @param rightBracket the right curly bracket
@@ -7792,7 +7820,7 @@ class ImplementsClause extends ASTNode {
NodeList<TypeName> _interfaces;
/**
- * Initialize a newly created extends clause.
+ * Initialize a newly created implements clause.
*
* @param keyword the token representing the 'implements' keyword
* @param interfaces the interfaces that are being implemented
@@ -7804,7 +7832,7 @@ class ImplementsClause extends ASTNode {
}
/**
- * Initialize a newly created extends clause.
+ * Initialize a newly created implements clause.
*
* @param keyword the token representing the 'implements' keyword
* @param interfaces the interfaces that are being implemented
@@ -10231,6 +10259,84 @@ abstract class NamespaceDirective extends UriBasedDirective {
Token get firstTokenAfterCommentAndMetadata => _keyword;
}
/**
+ * Instances of the class `NativeClause` represent the "native" clause in an class
+ * declaration.
+ *
+ * <pre>
+ * nativeClause ::=
+ * 'native' [StringLiteral]
+ * </pre>
+ *
+ * @coverage dart.engine.ast
+ */
+class NativeClause extends ASTNode {
+
+ /**
+ * The token representing the 'native' keyword.
+ */
+ Token _keyword;
+
+ /**
+ * The name of the native object that implements the class.
+ */
+ StringLiteral _name;
+
+ /**
+ * Initialize a newly created native clause.
+ *
+ * @param keyword the token representing the 'native' keyword
+ * @param name the name of the native object that implements the class.
+ */
+ NativeClause.full(Token keyword, StringLiteral name) {
+ this._keyword = keyword;
+ this._name = name;
+ }
+
+ /**
+ * Initialize a newly created native clause.
+ *
+ * @param keyword the token representing the 'native' keyword
+ * @param name the name of the native object that implements the class.
+ */
+ NativeClause({Token keyword, StringLiteral name}) : this.full(keyword, name);
+ accept(ASTVisitor visitor) => visitor.visitNativeClause(this);
+ Token get beginToken => _keyword;
+ Token get endToken => _name.endToken;
+
+ /**
+ * Return the token representing the 'native' keyword.
+ *
+ * @return the token representing the 'native' keyword
+ */
+ Token get keyword => _keyword;
+
+ /**
+ * @return the name of the native object that implements the class.
+ */
+ StringLiteral get name => _name;
+
+ /**
+ * Set the token representing the 'native' keyword to the given token.
+ *
+ * @param keyword the token representing the 'native' keyword
+ */
+ void set keyword(Token keyword2) {
+ this._keyword = keyword2;
+ }
+
+ /**
+ * Sets the name of the native object that implements the class.
+ *
+ * @param name the name of the native object that implements the class.
+ */
+ void set name(StringLiteral name2) {
+ this._name = name2;
+ }
+ void visitChildren(ASTVisitor<Object> visitor) {
+ safelyVisitChild(_name, visitor);
+ }
+}
+/**
* Instances of the class `NativeFunctionBody` represent a function body that consists of a
* native keyword followed by a string literal.
*
@@ -15292,6 +15398,7 @@ class GeneralizingASTVisitor<R> implements ASTVisitor<R> {
R visitMethodInvocation(MethodInvocation node) => visitExpression(node);
R visitNamedExpression(NamedExpression node) => visitExpression(node);
R visitNamespaceDirective(NamespaceDirective node) => visitUriBasedDirective(node);
+ R visitNativeClause(NativeClause node) => visitNode(node);
R visitNativeFunctionBody(NativeFunctionBody node) => visitFunctionBody(node);
R visitNode(ASTNode node) {
node.visitChildren(this);
@@ -15715,6 +15822,10 @@ class RecursiveASTVisitor<R> implements ASTVisitor<R> {
node.visitChildren(this);
return null;
}
+ R visitNativeClause(NativeClause node) {
+ node.visitChildren(this);
+ return null;
+ }
R visitNativeFunctionBody(NativeFunctionBody node) {
node.visitChildren(this);
return null;
@@ -15938,6 +16049,7 @@ class SimpleASTVisitor<R> implements ASTVisitor<R> {
R visitMethodDeclaration(MethodDeclaration node) => null;
R visitMethodInvocation(MethodInvocation node) => null;
R visitNamedExpression(NamedExpression node) => null;
+ R visitNativeClause(NativeClause node) => null;
R visitNativeFunctionBody(NativeFunctionBody node) => null;
R visitNullLiteral(NullLiteral node) => null;
R visitParenthesizedExpression(ParenthesizedExpression node) => null;
@@ -16478,6 +16590,11 @@ class ToSourceVisitor implements ASTVisitor<Object> {
visit3(" ", node.expression);
return null;
}
+ Object visitNativeClause(NativeClause node) {
+ _writer.print("native ");
+ visit(node.name);
+ return null;
+ }
Object visitNativeFunctionBody(NativeFunctionBody node) {
_writer.print("native ");
visit(node.stringLiteral);
@@ -16914,6 +17031,7 @@ class ASTCloner implements ASTVisitor<ASTNode> {
MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new MethodDeclaration.full(clone2(node.documentationComment), clone3(node.metadata), node.externalKeyword, node.modifierKeyword, clone2(node.returnType), node.propertyKeyword, node.operatorKeyword, clone2(node.name), clone2(node.parameters), clone2(node.body));
MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInvocation.full(clone2(node.target), node.period, clone2(node.methodName), clone2(node.argumentList));
NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpression.full(clone2(node.name), clone2(node.expression));
+ ASTNode visitNativeClause(NativeClause node) => new NativeClause.full(node.keyword, clone2(node.name));
NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new NativeFunctionBody.full(node.nativeToken, clone2(node.stringLiteral), node.semicolon);
NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral.full(node.literal);
ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression node) => new ParenthesizedExpression.full(node.leftParenthesis, clone2(node.expression), node.rightParenthesis);

Powered by Google App Engine
This is Rietveld 408576698