dartfx library

Classes

Annotation
An annotation that can be associated with an AST node.
AsciiControlCharacterToken
Represents an ASCII control character outside a string or comment.
AsExpression
An as expression.
AssignmentExpression
An assignment expression.
AstContext
AstReferenceVariable
模拟引用变量
AstResolver
Clients may not extend, implement or mix-in this class.
AstRuntimeExecutor
Runtime executor interface
AstRuntimeNode
A node in the AST structure for a Dart program.
AstRuntimeNodeParser
AwaitExpression
An await expression.
BeginToken
The opening half of a grouping pair of tokens. This is used for curly brackets ('{'), parentheses ('('), and square brackets ('[').
BinaryExpression
A binary (infix) expression.
Block
A sequence of statements.
BlockFunctionBody
A function body that consists of a block of statements.
BooleanLiteral
A boolean literal expression.
BreakStatement
A break statement.
ClassDeclaration
The declaration of a class.
ConditionalExpression
A conditional expression.
ConstructorDeclaration
A constructor declaration.
ConstructorFieldInitializer
The initialization of a field within a constructor's initialization list.
ConstructorName
The name of a constructor.
DefaultFormalParameter
A formal parameter with a default value.
DoubleLiteral
A floating point literal expression.
EncodingErrorToken
Represents an encoding error.
ErrorToken
ExpressionFunctionBody
A function body consisting of a single expression.
ExpressionStatement
An expression used as a statement.
FHAstAnnotation
FieldDeclaration
The declaration of one or more fields of the same type.
FieldFormalParameter
A field formal parameter.
ForLoopParts
The parts of a for or for-each loop that control the iteration.
FormalParameter
// A node that represents a statement. // // statement ::= // Block // | VariableDeclarationStatement // | ForStatement // | ForEachStatement // | WhileStatement // | DoStatement // | SwitchStatement // | IfStatement // | TryStatement // | BreakStatement // | ContinueStatement // | ReturnStatement // | ExpressionStatement // | FunctionDeclarationStatement // // Clients may not extend, implement or mix-in this class. A node representing a parameter to a function.
FormalParameterList
The formal parameter list of a method declaration, function declaration, or function type alias.
ForStatement
A for or for-each statement.
FunctionBody
A node representing the body of a function or method.
FunctionDeclaration
A top-level function declaration.
FunctionExpression
A function expression.
FunctionExpressionInvocation
The invocation of a function resulting from evaluating an expression.
IfStatement
An if statement.
ImplementsClause
The 'implements' clause in an class declaration.
IndexExpression
An index expression.
InstanceCreationExpression
An instance creation expression.
IntegerLiteral
An integer literal expression.
InterpolationExpression
An expression embedded in a string interpolation.
InterpolationString
A non-empty substring of an interpolated string.
IsExpression
An is expression.
ListLiteral
A list literal.
Literal
// A node that represents an expression. // // expression ::= // AssignmentExpression // | ConditionalExpression cascadeSection* // | ThrowExpression // | InterpolationExpression // // Clients may not extend, implement or mix-in this class. A node that represents a literal expression.
MapLiteralEntry
A single key/value pair in a map literal.
MemberExpression
The callee of MethodInvocation callee ::= (Expression).(SimpleIdentifier)
MethodDeclaration
A method declaration.
MethodInvocation
The invocation of either a function or a method.
NamedExpression
An expression that has a name associated with it. They are used in method invocations when there are named parameters.
NonAsciiIdentifierToken
Represents a non-ASCII character outside a string or comment.
NonAsciiWhitespaceToken
Represents a non-ASCII whitespace outside a string or comment.
NullLiteral
A null literal expression.
PrefixedIdentifier
An identifier that is prefixed or an access to an object property where the target of the property access is a simple identifier.
PrefixExpression
A prefix unary expression.
Program
PropertyAccess
The access of a property of an object.
ReplacementToken
A token used to replace another token in the stream, while still keeping the old token around (in replacedToken). Automatically sets the offset and precedingComments from the data available on replacedToken.
Resolver
ReturnStatement
A return statement.
SetOrMapLiteral
A set or map literal.
SimpleFormalParameter
A simple formal parameter.
SimpleIdentifier
A simple identifier.
SimpleToken
StringInterpolation
A string interpolation literal. Example: 'My name is $name' OR 'My name is ${person.name}'
StringLiteral
A string literal expression.
SuperConstructorInvocation
The invocation of a superclass' constructor from within a constructor's initialization list.
SuperExpression
A super expression.
SwitchCase
A case in a switch statement.
SwitchStatement
A switch statement.
SyntheticBeginToken
A synthetic token.
SyntheticToken
A synthetic token.
ThisExpression
A this expression.
Token
TokenClass
The classes (or groups) of tokens with a similar use.
TokenType
The types of tokens that can be returned by the scanner.
TypeName
The name of a type
UnmatchedToken
Represents an open brace without a matching close brace.
UnsupportedOperator
Denotes an operator that is not supported in the Dart language.
UnterminatedString
Represents an unterminated string.
UnterminatedToken
Represents an unterminated token.
VariableDeclaration
An identifier that has an initial value associated with it.
VariableDeclarationList
The declaration of one or more variables of the same type.
WithClause
The with clause in a class declaration.

Functions

analysisExpression(String expression) List<AnalysisError>?
astNodeNameValue(AstRuntimeNodeName nodeName) String
buildUnexpectedCharacterToken(int character, int charOffset) ErrorToken
closeBraceFor(String openBrace) String
closeQuoteFor(String openQuote) String
fx(String expression, {GetEnvValue? onGetEnvValue}) → dynamic
Run expression and return the result.
fxAssignment(String expression, Map envValues, {void leftEnvs(List<String>)?}) → dynamic
Run assignment expression and return the right side value.
fxSetFunctionResolver(FunctionResolver functionResolver) → void
If there is a function witch the internal functions doesn't have. You can custom your own function by set a FunctionResolver.
fxWithEnvs(String expression, Map envValues) → dynamic
Run expression and return the result.
parseToken(String expression) Token

Typedefs

FunctionResolver = dynamic Function(String functionName, List arguments)