AstFactory class abstract
A collection of factory methods which may be used to create concrete instances of the interfaces that constitute the AST.
Clients should not extend, implement or mix-in this class.
- Annotations
-
- @Deprecated('Should not be used by clients')
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
adjacentStrings(
List< StringLiteral> strings) → AdjacentStrings -
Returns a newly created list of adjacent strings. To be syntactically
valid, the list of
strings
must contain at least two elements. -
annotation(
{required Token atSign, required Identifier name, TypeArgumentList? typeArguments, Token? period, SimpleIdentifier? constructorName, ArgumentList? arguments}) → Annotation -
Returns a newly created annotation. Both the
period
and theconstructorName
can benull
if the annotation is not referencing a named constructor. Thearguments
can benull
if the annotation is not referencing a constructor. -
argumentList(
Token leftParenthesis, List< Expression> arguments, Token rightParenthesis) → ArgumentList -
Returns a newly created list of arguments. The list of
arguments
can benull
if there are no arguments. -
asExpression(
Expression expression, Token asOperator, TypeAnnotation type) → AsExpression - Returns a newly created as expression.
-
assertInitializer(
Token assertKeyword, Token leftParenthesis, Expression condition, Token? comma, Expression? message, Token rightParenthesis) → AssertInitializer -
Returns a newly created assert initializer. The
comma
andmessage
can benull
if there is no message. -
assertStatement(
Token assertKeyword, Token leftParenthesis, Expression condition, Token? comma, Expression? message, Token rightParenthesis, Token semicolon) → AssertStatement -
Returns a newly created assert statement. The
comma
andmessage
can benull
if there is no message. -
assignmentExpression(
Expression leftHandSide, Token operator, Expression rightHandSide) → AssignmentExpression - Returns a newly created assignment expression.
-
awaitExpression(
Token awaitKeyword, Expression expression) → AwaitExpression - Returns a newly created await expression.
-
binaryExpression(
Expression leftOperand, Token operator, Expression rightOperand) → BinaryExpression - Returns a newly created binary expression.
-
block(
Token leftBracket, List< Statement> statements, Token rightBracket) → Block - Returns a newly created block of code.
-
blockComment(
List< Token> tokens) → Comment -
Returns a block comment consisting of the given
tokens
. -
blockFunctionBody(
Token? keyword, Token? star, Block block) → BlockFunctionBody -
Returns a newly created function body consisting of a block of
statements. The
keyword
can benull
if there is no keyword specified for the block. Thestar
can benull
if there is no star following the keyword (and must benull
if there is no keyword). -
booleanLiteral(
Token literal, bool value) → BooleanLiteral - Returns a newly created boolean literal.
-
breakStatement(
Token breakKeyword, SimpleIdentifier? label, Token semicolon) → BreakStatement -
Returns a newly created break statement. The
label
can benull
if there is no label associated with the statement. -
cascadeExpression(
Expression target, List< Expression> cascadeSections) → CascadeExpression -
Returns a newly created cascade expression. The list of
cascadeSections
must contain at least one element. -
catchClause(
Token? onKeyword, TypeAnnotation? exceptionType, Token? catchKeyword, Token? leftParenthesis, SimpleIdentifier? exceptionParameter, Token? comma, SimpleIdentifier? stackTraceParameter, Token? rightParenthesis, Block body) → CatchClause -
Returns a newly created catch clause. The
onKeyword
andexceptionType
can benull
if the clause will catch all exceptions. Thecomma
andstackTraceParameter
can benull
if the stack trace parameter is not defined. -
classDeclaration(
Comment? comment, List< Annotation> ? metadata, Token? abstractKeyword, Token? macroKeyword, Token? augmentKeyword, Token classKeyword, SimpleIdentifier name, TypeParameterList? typeParameters, ExtendsClause? extendsClause, WithClause? withClause, ImplementsClause? implementsClause, Token leftBracket, List<ClassMember> members, Token rightBracket) → ClassDeclaration -
Returns a newly created class declaration. Either or both of the
comment
andmetadata
can benull
if the class does not have the corresponding attribute. TheabstractKeyword
can benull
if the class is not abstract. ThemacroKeyword
can benull
if the class is not a macro class. TheaugmentKeyword
can benull
if the class is not an augmentation class. ThetypeParameters
can benull
if the class does not have any type parameters. Any or all of theextendsClause
,withClause
, andimplementsClause
can benull
if the class does not have the corresponding clause. The list ofmembers
can benull
if the class does not have any members. -
classTypeAlias(
Comment? comment, List< Annotation> ? metadata, Token keyword, SimpleIdentifier name, TypeParameterList? typeParameters, Token equals, Token? abstractKeyword, Token? macroKeyword, Token? augmentKeyword, NamedType superclass, WithClause withClause, ImplementsClause? implementsClause, Token semicolon) → ClassTypeAlias -
Returns a newly created class type alias. Either or both of the
comment
andmetadata
can benull
if the class type alias does not have the corresponding attribute. ThetypeParameters
can benull
if the class does not have any type parameters. TheabstractKeyword
can benull
if the class is not abstract. ThemacroKeyword
can benull
if the class is not a macro class. TheaugmentKeyword
can benull
if the class is not an augmentation class. TheimplementsClause
can benull
if the class does not implement any interfaces. -
commentReference(
Token? newKeyword, CommentReferableExpression expression) → CommentReference -
Returns a newly created reference to a Dart element. The
newKeyword
can benull
if the reference is not to a constructor. -
compilationUnit(
{required Token beginToken, ScriptTag? scriptTag, List< Directive> ? directives, List<CompilationUnitMember> ? declarations, required Token endToken, required FeatureSet featureSet, LineInfo? lineInfo}) → CompilationUnit -
Returns a newly created compilation unit to have the given directives and
declarations. The
scriptTag
can benull
(or omitted) if there is no script tag in the compilation unit. The list ofdeclarations
can benull
(or omitted) if there are no directives in the compilation unit. The list ofdeclarations
can benull
(or omitted) if there are no declarations in the compilation unit. -
conditionalExpression(
Expression condition, Token question, Expression thenExpression, Token colon, Expression elseExpression) → ConditionalExpression - Returns a newly created conditional expression.
-
configuration(
Token ifKeyword, Token leftParenthesis, DottedName name, Token? equalToken, StringLiteral? value, Token rightParenthesis, StringLiteral libraryUri) → Configuration - Returns a newly created configuration.
-
constructorDeclaration(
Comment? comment, List< Annotation> ? metadata, Token? externalKeyword, Token? constKeyword, Token? factoryKeyword, Identifier returnType, Token? period, SimpleIdentifier? name, FormalParameterList parameters, Token? separator, List<ConstructorInitializer> ? initializers, ConstructorName? redirectedConstructor, FunctionBody body) → ConstructorDeclaration -
Returns a newly created constructor declaration. The
externalKeyword
can benull
if the constructor is not external. Either or both of thecomment
andmetadata
can benull
if the constructor does not have the corresponding attribute. TheconstKeyword
can benull
if the constructor cannot be used to create a constant. ThefactoryKeyword
can benull
if the constructor is not a factory. Theperiod
andname
can both benull
if the constructor is not a named constructor. Theseparator
can benull
if the constructor does not have any initializers and does not redirect to a different constructor. The list ofinitializers
can benull
if the constructor does not have any initializers. TheredirectedConstructor
can benull
if the constructor does not redirect to a different constructor. -
constructorFieldInitializer(
Token? thisKeyword, Token? period, SimpleIdentifier fieldName, Token equals, Expression expression) → ConstructorFieldInitializer -
Returns a newly created field initializer to initialize the field with
the given name to the value of the given expression. The
thisKeyword
andperiod
can benull
if the 'this' keyword was not specified. -
constructorName(
NamedType type, Token? period, SimpleIdentifier? name) → ConstructorName -
Returns a newly created constructor name. The
period
andname
can benull
if the constructor being named is the unnamed constructor. -
constructorReference(
{required ConstructorName constructorName}) → ConstructorReference - Returns a newly created constructor reference.
-
continueStatement(
Token continueKeyword, SimpleIdentifier? label, Token semicolon) → ContinueStatement -
Returns a newly created continue statement. The
label
can benull
if there is no label associated with the statement. -
declaredIdentifier(
Comment? comment, List< Annotation> ? metadata, Token? keyword, TypeAnnotation? type, SimpleIdentifier identifier) → DeclaredIdentifier -
Returns a newly created formal parameter. Either or both of the
comment
andmetadata
can benull
if the declaration does not have the corresponding attribute. Thekeyword
can benull
if a type name is given. Thetype
must benull
if the keyword is 'var'. -
defaultFormalParameter(
NormalFormalParameter parameter, ParameterKind kind, Token? separator, Expression? defaultValue) → DefaultFormalParameter -
Returns a newly created default formal parameter. The
separator
anddefaultValue
can benull
if there is no default value. -
documentationComment(
List< Token> tokens, [List<CommentReference> references]) → Comment -
Returns a documentation comment consisting of the given
tokens
and having the givenreferences
(if supplied) embedded within it. -
doStatement(
Token doKeyword, Statement body, Token whileKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Token semicolon) → DoStatement - Returns a newly created do loop.
-
dottedName(
List< SimpleIdentifier> components) → DottedName - Returns a newly created dotted name.
-
doubleLiteral(
Token literal, double value) → DoubleLiteral - Returns a newly created floating point literal.
-
emptyFunctionBody(
Token semicolon) → EmptyFunctionBody - Returns a newly created function body.
-
emptyStatement(
Token semicolon) → EmptyStatement - Returns a newly created empty statement.
-
endOfLineComment(
List< Token> tokens) → Comment -
Returns an end-of-line comment consisting of the given
tokens
. -
enumConstantDeclaration(
Comment? comment, List< Annotation> ? metadata, SimpleIdentifier name) → EnumConstantDeclaration -
Returns a newly created enum constant declaration. Either or both of the
comment
andmetadata
can benull
if the constant does not have the corresponding attribute. (Technically, enum constants cannot have metadata, but we allow it for consistency.) -
enumDeclaration(
Comment? comment, List< Annotation> ? metadata, Token enumKeyword, SimpleIdentifier name, Token leftBracket, List<EnumConstantDeclaration> constants, Token rightBracket) → EnumDeclaration -
Returns a newly created enumeration declaration. Either or both of the
comment
andmetadata
can benull
if the declaration does not have the corresponding attribute. The list ofconstants
must contain at least one value. -
enumDeclaration2(
{required Comment? comment, required List< Annotation> ? metadata, required Token enumKeyword, required SimpleIdentifier name, required TypeParameterList? typeParameters, required WithClause? withClause, required ImplementsClause? implementsClause, required Token leftBracket, required List<EnumConstantDeclaration> constants, required Token? semicolon, required List<ClassMember> members, required Token rightBracket}) → EnumDeclaration -
Returns a newly created enumeration declaration. Either or both of the
comment
andmetadata
can benull
if the declaration does not have the corresponding attribute. The list ofconstants
must contain at least one value. -
exportDirective(
Comment? comment, List< Annotation> ? metadata, Token keyword, StringLiteral libraryUri, List<Configuration> ? configurations, List<Combinator> ? combinators, Token semicolon) → ExportDirective -
Returns a newly created export directive. Either or both of the
comment
andmetadata
can benull
if the directive does not have the corresponding attribute. The list ofcombinators
can benull
if there are no combinators. -
expressionFunctionBody(
Token? keyword, Token functionDefinition, Expression expression, Token? semicolon) → ExpressionFunctionBody -
Returns a newly created function body consisting of an expression.
The
keyword
can benull
if the function body is not an async function body. -
expressionFunctionBody2(
{Token? keyword, Token? star, required Token functionDefinition, required Expression expression, Token? semicolon}) → ExpressionFunctionBody -
Returns a newly created function body consisting of an expression.
The
keyword
can benull
if the function body is not an async function body. Thestar
can benull
if there is no star following the keyword (and must benull
if there is no keyword). -
expressionStatement(
Expression expression, Token? semicolon) → ExpressionStatement - Returns a newly created expression statement.
-
extendsClause(
Token extendsKeyword, NamedType superclass) → ExtendsClause - Returns a newly created extends clause.
-
extensionDeclaration(
{Comment? comment, List< Annotation> ? metadata, required Token extensionKeyword, Token? typeKeyword, SimpleIdentifier? name, TypeParameterList? typeParameters, required Token onKeyword, required TypeAnnotation extendedType, required Token leftBracket, required List<ClassMember> members, required Token rightBracket}) → ExtensionDeclaration -
Return a newly created extension declaration. The list of
typeParameters
can benull
if there are no type parameters. -
extensionOverride(
{required Identifier extensionName, TypeArgumentList? typeArguments, required ArgumentList argumentList}) → ExtensionOverride -
Return a newly created extension override. The list of
typeArguments
can benull
if there are no type arguments. -
fieldDeclaration2(
{Comment? comment, List< Annotation> ? metadata, Token? abstractKeyword, Token? augmentKeyword, Token? covariantKeyword, Token? externalKeyword, Token? staticKeyword, required VariableDeclarationList fieldList, required Token semicolon}) → FieldDeclaration -
Returns a newly created field declaration. Either or both of the
comment
andmetadata
can benull
if the declaration does not have the corresponding attribute. TheabstractKeyword
,augmentKeyword
,covariantKeyword
,externalKeyword
andstaticKeyword
can benull
if the field does not have the corresponding modifier. -
fieldFormalParameter2(
{Comment? comment, List< Annotation> ? metadata, Token? covariantKeyword, Token? requiredKeyword, Token? keyword, TypeAnnotation? type, required Token thisKeyword, required Token period, required SimpleIdentifier identifier, TypeParameterList? typeParameters, FormalParameterList? parameters, Token? question}) → FieldFormalParameter -
Returns a newly created formal parameter. Either or both of the
comment
andmetadata
can benull
if the parameter does not have the corresponding attribute. Thekeyword
can benull
if there is a type. Thetype
must benull
if the keyword is 'var'. ThethisKeyword
andperiod
can benull
if the keyword 'this' was not provided. Theparameters
can benull
if this is not a function-typed field formal parameter. -
forEachPartsWithDeclaration(
{required DeclaredIdentifier loopVariable, required Token inKeyword, required Expression iterable}) → ForEachPartsWithDeclaration - Returns a newly created for each part that includes a declaration.
-
forEachPartsWithIdentifier(
{required SimpleIdentifier identifier, required Token inKeyword, required Expression iterable}) → ForEachPartsWithIdentifier - Returns a newly created for each part that includes an identifier that is declared outside of the loop.
-
forElement(
{Token? awaitKeyword, required Token forKeyword, required Token leftParenthesis, required ForLoopParts forLoopParts, required Token rightParenthesis, required CollectionElement body}) → ForElement - Returns a newly created for element that can be part of a list, map or set literal.
-
formalParameterList(
Token leftParenthesis, List< FormalParameter> parameters, Token? leftDelimiter, Token? rightDelimiter, Token rightParenthesis) → FormalParameterList -
Returns a newly created parameter list. The list of
parameters
can benull
if there are no parameters. TheleftDelimiter
andrightDelimiter
can benull
if there are no optional parameters. -
forPartsWithDeclarations(
{required VariableDeclarationList variables, required Token leftSeparator, Expression? condition, required Token rightSeparator, List< Expression> ? updaters}) → ForPartsWithDeclarations - Returns a newly created for part that includes a declaration.
-
forPartsWithExpression(
{Expression? initialization, required Token leftSeparator, Expression? condition, required Token rightSeparator, List< Expression> ? updaters}) → ForPartsWithExpression - Returns a newly created for part that includes an expression.
-
forStatement(
{Token? awaitKeyword, required Token forKeyword, required Token leftParenthesis, required ForLoopParts forLoopParts, required Token rightParenthesis, required Statement body}) → ForStatement - Returns a newly created for statement.
-
functionDeclaration(
Comment? comment, List< Annotation> ? metadata, Token? augmentKeyword, Token? externalKeyword, TypeAnnotation? returnType, Token? propertyKeyword, SimpleIdentifier name, FunctionExpression functionExpression) → FunctionDeclaration -
Returns a newly created function declaration. Either or both of the
comment
andmetadata
can benull
if the function does not have the corresponding attribute. TheaugmentKeyword
can benull
if the function is not a function augmentation. TheexternalKeyword
can benull
if the function is not an external function. ThereturnType
can benull
if no return type was specified. ThepropertyKeyword
can benull
if the function is neither a getter or a setter. -
functionDeclarationStatement(
FunctionDeclaration functionDeclaration) → FunctionDeclarationStatement - Returns a newly created function declaration statement.
-
functionExpression(
TypeParameterList? typeParameters, FormalParameterList? parameters, FunctionBody body) → FunctionExpression - Returns a newly created function declaration.
-
functionExpressionInvocation(
Expression function, TypeArgumentList? typeArguments, ArgumentList argumentList) → FunctionExpressionInvocation - Returns a newly created function expression invocation.
-
functionReference(
{required Expression function, TypeArgumentList? typeArguments}) → FunctionReference -
Returns a newly created function reference. The
typeArguments
can benull
if there are no type arguments being applied to the function. -
functionTypeAlias(
Comment? comment, List< Annotation> ? metadata, Token keyword, TypeAnnotation? returnType, SimpleIdentifier name, TypeParameterList? typeParameters, FormalParameterList parameters, Token semicolon) → FunctionTypeAlias -
Returns a newly created function type alias. Either or both of the
comment
andmetadata
can benull
if the function does not have the corresponding attribute. ThereturnType
can benull
if no return type was specified. ThetypeParameters
can benull
if the function has no type parameters. -
functionTypedFormalParameter2(
{Comment? comment, List< Annotation> ? metadata, Token? covariantKeyword, Token? requiredKeyword, TypeAnnotation? returnType, required SimpleIdentifier identifier, TypeParameterList? typeParameters, required FormalParameterList parameters, Token? question}) → FunctionTypedFormalParameter -
Returns a newly created formal parameter. Either or both of the
comment
andmetadata
can benull
if the parameter does not have the corresponding attribute. ThereturnType
can benull
if no return type was specified. -
genericFunctionType(
TypeAnnotation? returnType, Token functionKeyword, TypeParameterList? typeParameters, FormalParameterList parameters, {Token? question}) → GenericFunctionType - Initialize a newly created generic function type.
-
genericTypeAlias(
Comment? comment, List< Annotation> ? metadata, Token typedefKeyword, SimpleIdentifier name, TypeParameterList? typeParameters, Token equals, TypeAnnotation type, Token semicolon) → GenericTypeAlias -
Returns a newly created generic type alias. Either or both of the
comment
andmetadata
can benull
if the variable list does not have the corresponding attribute. ThetypeParameters
can benull
if there are no type parameters. -
hideClause(
{required Token hideKeyword, required List< ShowHideClauseElement> elements}) → HideClause - Returns a newly created hide clause.
-
hideCombinator(
Token keyword, ) → HideCombinator - Returns a newly created import show combinator.
-
ifElement(
{required Token ifKeyword, required Token leftParenthesis, required Expression condition, required Token rightParenthesis, required CollectionElement thenElement, Token? elseKeyword, CollectionElement? elseElement}) → IfElement - Returns a newly created if element that can be part of a list, map or set literal.
-
ifStatement(
Token ifKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Statement thenStatement, Token? elseKeyword, Statement? elseStatement) → IfStatement -
Returns a newly created if statement. The
elseKeyword
andelseStatement
can benull
if there is no else clause. -
implementsClause(
Token implementsKeyword, List< NamedType> interfaces) → ImplementsClause - Returns a newly created implements clause.
-
implicitCallReference(
{required Expression expression, required MethodElement staticElement, required TypeArgumentList? typeArguments, required List< DartType> typeArgumentTypes}) → ImplicitCallReference - Returns a newly created implicit call reference.
-
importDirective(
Comment? comment, List< Annotation> ? metadata, Token keyword, StringLiteral libraryUri, List<Configuration> ? configurations, Token? deferredKeyword, Token? asKeyword, SimpleIdentifier? prefix, List<Combinator> ? combinators, Token semicolon) → ImportDirective -
Returns a newly created import directive. Either or both of the
comment
andmetadata
can benull
if the function does not have the corresponding attribute. ThedeferredKeyword
can benull
if the import is not deferred. TheasKeyword
andprefix
can benull
if the import does not specify a prefix. The list ofcombinators
can benull
if there are no combinators. -
indexExpressionForCascade2(
{required Token period, Token? question, required Token leftBracket, required Expression index, required Token rightBracket}) → IndexExpression - Returns a newly created index expression.
-
indexExpressionForTarget2(
{required Expression target, Token? question, required Token leftBracket, required Expression index, required Token rightBracket}) → IndexExpression - Returns a newly created index expression.
-
instanceCreationExpression(
Token? keyword, ConstructorName constructorName, ArgumentList argumentList, {TypeArgumentList? typeArguments}) → InstanceCreationExpression - Returns a newly created instance creation expression.
-
integerLiteral(
Token literal, int? value) → IntegerLiteral - Returns a newly created integer literal.
-
interpolationExpression(
Token leftBracket, Expression expression, Token? rightBracket) → InterpolationExpression - Returns a newly created interpolation expression.
-
interpolationString(
Token contents, String value) → InterpolationString - Returns a newly created string of characters that are part of a string interpolation.
-
isExpression(
Expression expression, Token isOperator, Token? notOperator, TypeAnnotation type) → IsExpression -
Returns a newly created is expression. The
notOperator
can benull
if the sense of the test is not negated. -
label(
SimpleIdentifier label, Token colon) → Label - Returns a newly created label.
-
labeledStatement(
List< Label> labels, Statement statement) → LabeledStatement - Returns a newly created labeled statement.
-
libraryDirective(
Comment? comment, List< Annotation> ? metadata, Token libraryKeyword, LibraryIdentifier name, Token semicolon) → LibraryDirective -
Returns a newly created library directive. Either or both of the
comment
andmetadata
can benull
if the directive does not have the corresponding attribute. -
libraryIdentifier(
List< SimpleIdentifier> components) → LibraryIdentifier - Returns a newly created prefixed identifier.
-
listLiteral(
Token? constKeyword, TypeArgumentList? typeArguments, Token leftBracket, List< CollectionElement> elements, Token rightBracket) → ListLiteral -
Returns a newly created list literal. The
constKeyword
can benull
if the literal is not a constant. ThetypeArguments
can benull
if no type arguments were declared. The list ofelements
can benull
if the list is empty. -
mapLiteralEntry(
Expression key, Token separator, Expression value) → MapLiteralEntry - Returns a newly created map literal entry.
-
methodDeclaration(
Comment? comment, List< Annotation> ? metadata, Token? externalKeyword, Token? modifierKeyword, TypeAnnotation? returnType, Token? propertyKeyword, Token? operatorKeyword, SimpleIdentifier name, TypeParameterList? typeParameters, FormalParameterList? parameters, FunctionBody body) → MethodDeclaration -
Returns a newly created method declaration. Either or both of the
comment
andmetadata
can benull
if the declaration does not have the corresponding attribute. TheexternalKeyword
can benull
if the method is not external. ThemodifierKeyword
can benull
if the method is neither abstract nor static. ThereturnType
can benull
if no return type was specified. ThepropertyKeyword
can benull
if the method is neither a getter or a setter. TheoperatorKeyword
can benull
if the method does not implement an operator. Theparameters
must benull
if this method declares a getter. -
methodInvocation(
Expression? target, Token? operator, SimpleIdentifier methodName, TypeArgumentList? typeArguments, ArgumentList argumentList) → MethodInvocation -
Returns a newly created method invocation. The
target
andoperator
can benull
if there is no target. -
mixinDeclaration(
Comment? comment, List< Annotation> ? metadata, Token? augmentKeyword, Token mixinKeyword, SimpleIdentifier name, TypeParameterList? typeParameters, OnClause? onClause, ImplementsClause? implementsClause, Token leftBracket, List<ClassMember> members, Token rightBracket) → MixinDeclaration - Return a newly created mixin declaration.
-
namedExpression(
Label name, Expression expression) → NamedExpression - Returns a newly created named expression.
-
namedType(
{required Identifier name, TypeArgumentList? typeArguments, Token? question}) → NamedType -
Returns a newly created named type. The
typeArguments
can benull
if there are no type arguments. Thequestion
can benull
if there is no question mark. -
nativeClause(
Token nativeKeyword, StringLiteral? name) → NativeClause - Returns a newly created native clause.
-
nativeFunctionBody(
Token nativeKeyword, StringLiteral? stringLiteral, Token semicolon) → NativeFunctionBody - Returns a newly created function body consisting of the 'native' token, a string literal, and a semicolon.
-
nodeList<
E extends AstNode> (AstNode owner) → NodeList< E> -
Returns a newly created list of nodes such that all of the nodes that
are added to the list will have their parent set to the given
owner
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullLiteral(
Token literal) → NullLiteral - Returns a newly created null literal.
-
onClause(
Token onKeyword, List< NamedType> superclassConstraints) → OnClause - Return a newly created on clause.
-
parenthesizedExpression(
Token leftParenthesis, Expression expression, Token rightParenthesis) → ParenthesizedExpression - Returns a newly created parenthesized expression.
-
partDirective(
Comment? comment, List< Annotation> ? metadata, Token partKeyword, StringLiteral partUri, Token semicolon) → PartDirective -
Returns a newly created part directive. Either or both of the
comment
andmetadata
can benull
if the directive does not have the corresponding attribute. -
partOfDirective(
Comment? comment, List< Annotation> ? metadata, Token partKeyword, Token ofKeyword, StringLiteral? uri, LibraryIdentifier? libraryName, Token semicolon) → PartOfDirective -
Returns a newly created part-of directive. Either or both of the
comment
andmetadata
can benull
if the directive does not have the corresponding attribute. -
postfixExpression(
Expression operand, Token operator) → PostfixExpression - Returns a newly created postfix expression.
-
prefixedIdentifier(
SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) → PrefixedIdentifier - Returns a newly created prefixed identifier.
-
prefixExpression(
Token operator, Expression operand) → PrefixExpression - Returns a newly created prefix expression.
-
propertyAccess(
Expression? target, Token operator, SimpleIdentifier propertyName) → PropertyAccess - Returns a newly created property access expression.
-
redirectingConstructorInvocation(
Token thisKeyword, Token? period, SimpleIdentifier? constructorName, ArgumentList argumentList) → RedirectingConstructorInvocation -
Returns a newly created redirecting invocation to invoke the constructor
with the given name with the given arguments. The
constructorName
can benull
if the constructor being invoked is the unnamed constructor. -
rethrowExpression(
Token rethrowKeyword) → RethrowExpression - Returns a newly created rethrow expression.
-
returnStatement(
Token returnKeyword, Expression? expression, Token semicolon) → ReturnStatement -
Returns a newly created return statement. The
expression
can benull
if no explicit value was provided. -
scriptTag(
Token scriptTag) → ScriptTag - Returns a newly created script tag.
-
setOrMapLiteral(
{Token? constKeyword, TypeArgumentList? typeArguments, required Token leftBracket, required List< CollectionElement> elements, required Token rightBracket}) → SetOrMapLiteral -
Returns a newly created set or map literal. The
constKeyword
can benull
if the literal is not a constant. ThetypeArguments
can benull
if no type arguments were declared. The list ofelements
can benull
if the set or map is empty. -
showClause(
{required Token showKeyword, required List< ShowHideClauseElement> elements}) → ShowClause - Returns a newly created show clause.
-
showCombinator(
Token keyword, List< SimpleIdentifier> shownNames) → ShowCombinator - Returns a newly created import show combinator.
-
showHideElement(
{required Token? modifier, required SimpleIdentifier name}) → ShowHideElement - Returns a newly created element of a show or hide clause.
-
simpleFormalParameter2(
{Comment? comment, List< Annotation> ? metadata, Token? covariantKeyword, Token? requiredKeyword, Token? keyword, TypeAnnotation? type, required SimpleIdentifier? identifier}) → SimpleFormalParameter -
Returns a newly created formal parameter. Either or both of the
comment
andmetadata
can benull
if the parameter does not have the corresponding attribute. Thekeyword
can benull
if a type was specified. Thetype
must benull
if the keyword is 'var'. -
simpleIdentifier(
Token token, {bool isDeclaration = false}) → SimpleIdentifier - Returns a newly created identifier.
-
simpleStringLiteral(
Token literal, String value) → SimpleStringLiteral - Returns a newly created simple string literal.
-
spreadElement(
{required Token spreadOperator, required Expression expression}) → SpreadElement - Returns a newly created spread element.
-
stringInterpolation(
List< InterpolationElement> elements) → StringInterpolation - Returns a newly created string interpolation expression.
-
superConstructorInvocation(
Token superKeyword, Token? period, SimpleIdentifier? constructorName, ArgumentList argumentList) → SuperConstructorInvocation -
Returns a newly created super invocation to invoke the inherited
constructor with the given name with the given arguments. The
period
andconstructorName
can benull
if the constructor being invoked is the unnamed constructor. -
superExpression(
Token superKeyword) → SuperExpression - Returns a newly created super expression.
-
superFormalParameter(
{Comment? comment, List< Annotation> ? metadata, Token? covariantKeyword, Token? requiredKeyword, Token? keyword, TypeAnnotation? type, required Token superKeyword, required Token period, required SimpleIdentifier identifier, TypeParameterList? typeParameters, FormalParameterList? parameters, Token? question}) → SuperFormalParameter -
Returns a newly created super-initializer parameter. Either or both of
the
comment
andmetadata
can benull
if the parameter does not have the corresponding attribute. Thekeyword
can benull
if there is a type. Thetype
must benull
if the keyword is 'var'. Theparameters
can benull
if this is not a function-typed super-initializer parameter. -
switchCase(
List< Label> labels, Token keyword, Expression expression, Token colon, List<Statement> statements) → SwitchCase -
Returns a newly created switch case. The list of
labels
can benull
if there are no labels. -
switchDefault(
List< Label> labels, Token keyword, Token colon, List<Statement> statements) → SwitchDefault -
Returns a newly created switch default. The list of
labels
can benull
if there are no labels. -
switchStatement(
Token switchKeyword, Token leftParenthesis, Expression expression, Token rightParenthesis, Token leftBracket, List< SwitchMember> members, Token rightBracket) → SwitchStatement -
Returns a newly created switch statement. The list of
members
can benull
if there are no switch members. -
symbolLiteral(
Token poundSign, List< Token> components) → SymbolLiteral - Returns a newly created symbol literal.
-
thisExpression(
Token thisKeyword) → ThisExpression - Returns a newly created this expression.
-
throwExpression(
Token throwKeyword, Expression expression) → ThrowExpression - Returns a newly created throw expression.
-
topLevelVariableDeclaration(
Comment? comment, List< Annotation> ? metadata, VariableDeclarationList variableList, Token semicolon, {Token? externalKeyword}) → TopLevelVariableDeclaration -
Returns a newly created top-level variable declaration. Either or both
of the
comment
andmetadata
can benull
if the variable does not have the corresponding attribute. -
toString(
) → String -
A string representation of this object.
inherited
-
tryStatement(
Token tryKeyword, Block body, List< CatchClause> catchClauses, Token? finallyKeyword, Block? finallyBlock) → TryStatement -
Returns a newly created try statement. The list of
catchClauses
can benull
if there are no catch clauses. ThefinallyKeyword
andfinallyBlock
can benull
if there is no finally clause. -
typeArgumentList(
Token leftBracket, List< TypeAnnotation> arguments, Token rightBracket) → TypeArgumentList - Returns a newly created list of type arguments.
-
typeLiteral(
{required NamedType typeName}) → TypeLiteral - Returns a newly created type literal.
-
typeParameter(
Comment? comment, List< Annotation> ? metadata, SimpleIdentifier name, Token? extendsKeyword, TypeAnnotation? bound) → TypeParameter -
Returns a newly created type parameter. Either or both of the
comment
andmetadata
can benull
if the parameter does not have the corresponding attribute. TheextendsKeyword
andbound
can benull
if the parameter does not have an upper bound. -
typeParameterList(
Token leftBracket, List< TypeParameter> typeParameters, Token rightBracket) → TypeParameterList - Returns a newly created list of type parameters.
-
variableDeclaration(
SimpleIdentifier name, Token? equals, Expression? initializer) → VariableDeclaration -
Returns a newly created variable declaration. The
equals
andinitializer
can benull
if there is no initializer. -
variableDeclarationList(
Comment? comment, List< Annotation> ? metadata, Token? keyword, TypeAnnotation? type, List<VariableDeclaration> variables) → VariableDeclarationList -
Returns a newly created variable declaration list. Either or both of the
comment
andmetadata
can benull
if the variable list does not have the corresponding attribute. Thekeyword
can benull
if a type was specified. Thetype
must benull
if the keyword is 'var'. -
variableDeclarationList2(
{Comment? comment, List< Annotation> ? metadata, Token? lateKeyword, Token? keyword, TypeAnnotation? type, required List<VariableDeclaration> variables}) → VariableDeclarationList -
Returns a newly created variable declaration list. Either or both of the
comment
andmetadata
can benull
if the variable list does not have the corresponding attribute. Thekeyword
can benull
if a type was specified. Thetype
must benull
if the keyword is 'var'. -
variableDeclarationStatement(
VariableDeclarationList variableList, Token semicolon) → VariableDeclarationStatement - Returns a newly created variable declaration statement.
-
whileStatement(
Token whileKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Statement body) → WhileStatement - Returns a newly created while statement.
-
withClause(
Token withKeyword, List< NamedType> mixinTypes) → WithClause - Returns a newly created with clause.
-
yieldStatement(
Token yieldKeyword, Token? star, Expression expression, Token semicolon) → YieldStatement -
Returns a newly created yield expression. The
star
can benull
if no star was provided.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited