Statement class
A Statement is a syntactic unit of an imperative programming language that expresses some action to be carried out.
See: https://dart.dev/guides/language/language-tour#control-flow-statements
- Inheritance
- Implementers
Constructors
-
Statement(List<
CodeNode> nodes, {bool hasEndOfStatement = true}) - Statement.assert$(Expression expression, {String? message})
- Statement.assignVariable(String name, Expression value, {bool nullAware = false, bool this$ = false})
- Statement.break$()
- Statement.continue$()
- Statement.doWhile$(Block loopBlock, Expression condition)
- Statement.for$(Statement initialization, Expression condition, Expression manipulation, Block loopBlock)
- Statement.forEach$(Statement initialization, Expression in$, Block loopBlock)
- Statement.if$(Expression condition, Block ifBock, {Block? elseBlock})
-
Statement.ifChain$(Map<
Expression, Block> conditionsAndBlocks, {Block? elseBlock}) - Statement.library(String name)
- Statement.ofExpression(Expression expression)
- Statement.print(Expression expression)
- Statement.rethrow$()
- Statement.return$(Expression expression)
-
Statement.switch$(Expression condition, Map<
Expression, Block> valuesAndBlocks, {Block? defaultBlock}) - Statement.throw$(Expression expression)
-
Statement.try$(Block tryBlock, {List<
Catch> catches = const [], Block? finallyBlock}) - Statement.while$(Expression condition, Block loopBlock)
Properties
- hasEndOfStatement → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
nodes
→ List<
CodeNode> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
codeNodes(
Context context) → List< CodeNode> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toUnFormattedString(
Context context) → String -
Recursive call to get the unformatted code from all nodes
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited