Expression class abstract
Represents a code block that wraps an Expression. Represents a Dart expression.
See various concrete implementations for details.
Constructors
- Expression()
-
const
Properties
- awaited → Expression
-
This expression preceded by
await.no setter - code → Code
-
The expression as a valid Code block.
no setter
- expression → Expression
-
May be overridden to support other types implementing Expression.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConst → bool
-
Whether this expression implies a const context for sub expressions.
no setter
- nullChecked → Expression
-
Applies the null check operator on this expression, returning
this!.no setter - nullSafeSpread → Expression
-
This expression preceded by the null safe spread operator
?....no setter - parenthesized → ParenthesizedExpression
-
Returns this expression wrapped in parenthesis.
no setter
- returned → Expression
-
This expression preceded by
return.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spread → Expression
-
This expression preceded by the spread operator
....no setter - statement → Code
-
The expression as a valid Code block with a trailing
;.no setter - thrown → Expression
-
This expression preceded by
throw.no setter
Methods
-
accept<
R> (covariant ExpressionVisitor< R> visitor, [R? context]) → R -
override
-
addAssign(
Expression other) → Expression -
Return
this+=other. -
and(
Expression other) → Expression -
Returns the result of
this&&other. -
asA(
Expression other) → Expression -
Returns the result of
thisasother. -
assign(
Expression other) → Expression -
Return
{this} = {other}. -
assignConst(
String name, [Reference? type]) → Expression -
Return
const {name} = {this}. -
assignFinal(
String name, [Reference? type]) → Expression -
Return
final {name} = {this}. -
assignNullAware(
Expression other) → Expression -
Return
{this} ??= {other}. -
assignVar(
String name, [Reference? type]) → Expression -
Return
var {name} = {this}. -
bitwiseAndAssign(
Expression other) → Expression -
Return
this&=other. -
bitwiseOrAssign(
Expression other) → Expression -
Return
this|=other. -
bitwiseXorAssign(
Expression other) → Expression -
Return
this^=other. -
call(
Iterable< Expression> positionalArguments, [Map<String, Expression> namedArguments = const {}, List<Reference> typeArguments = const []]) → Expression - Call this expression as a method.
-
cascade(
String name) → Expression -
Returns an expression accessing
..<name>on this expression. -
conditional(
Expression whenTrue, Expression whenFalse) → Expression -
divideAssign(
Expression other) → Expression -
Return
this/=other. -
equalTo(
Expression other) → Expression -
Returns the result of
this==other. -
euclideanModuloAssign(
Expression other) → Expression -
Return
this%=other. -
greaterOrEqualTo(
Expression other) → Expression -
Returns the result of
this>=other. -
greaterThan(
Expression other) → Expression -
Returns the result of
this>other. -
ifNullThen(
Expression other) → Expression -
Return
{this} ?? {other}. -
index(
Expression index) → Expression -
Returns accessing the index operator (
[]) onthis. -
intDivideAssign(
Expression other) → Expression -
Return
this~/=other. -
isA(
Expression other) → Expression -
Returns the result of
thisisother. -
isNotA(
Expression other) → Expression -
Returns the result of
thisis!other. -
lessOrEqualTo(
Expression other) → Expression -
Returns the result of
this<=other. -
lessThan(
Expression other) → Expression -
Returns the result of
this<other. -
multiplyAssign(
Expression other) → Expression -
Return
this*=other. -
negate(
) → Expression -
Returns the result of
!this. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEqualTo(
Expression other) → Expression -
Returns the result of
this!=other. -
nullSafeProperty(
String name) → Expression -
Returns an expression accessing
?.<name>on this expression. -
operatorAdd(
Expression other) → Expression -
Returns the result of
this+other. -
operatorBitwiseAnd(
Expression other) → Expression -
Returns the result of
this&other. -
operatorBitwiseOr(
Expression other) → Expression -
Returns the result of
this|other. -
operatorBitwiseXor(
Expression other) → Expression -
Returns the result of
this^other. -
operatorDivide(
Expression other) → Expression -
Returns the result of
this/other. -
operatorEuclideanModulo(
Expression other) → Expression -
Returns the result of
this%other. -
operatorIntDivide(
Expression other) → Expression -
Returns the result of
this~/other. -
operatorMultiply(
Expression other) → Expression -
Returns the result of
this*other. -
operatorShiftLeft(
Expression other) → Expression -
Returns the result of
this<<other. -
operatorShiftRight(
Expression other) → Expression -
Returns the result of
this>>other. -
operatorShiftRightUnsigned(
Expression other) → Expression -
Returns the result of
this>>>other. -
operatorSubstract(
Expression other) → Expression -
operatorSubtract(
Expression other) → Expression -
Returns the result of
this-other. -
operatorUnaryBitwiseComplement(
) → Expression -
Returns the result of
~this. -
operatorUnaryMinus(
) → Expression -
Returns the result of
-this. -
operatorUnaryPostfixDecrement(
) → Expression -
Return the result of
this--. -
operatorUnaryPostfixIncrement(
) → Expression -
Return the result of
this++. -
operatorUnaryPrefixDecrement(
) → Expression -
Returns the result of
--this. -
operatorUnaryPrefixIncrement(
) → Expression -
Returns the result of
++this. -
or(
Expression other) → Expression -
Returns the result of
this||other. -
property(
String name) → Expression -
Returns an expression accessing
.<name>on this expression. -
shiftLeftAssign(
Expression other) → Expression -
Return
this<<=other. -
shiftRightAssign(
Expression other) → Expression -
Return
this>>=other. -
shiftRightUnsignedAssign(
Expression other) → Expression -
Return
this>>>=other. -
subtractAssign(
Expression other) → Expression -
Return
this-=other. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited