- All Superinterfaces:
ASTNode,BlockItemNode,StatementNode
Represents a CIVL-C guarded command. A
$when statement has the
form $when (guard) body, where guard is a boolean-valued
expression and body is a statement.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.statement.BlockItemNode
BlockItemNode.BlockItemKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.statement.StatementNode
StatementNode.StatementKind -
Method Summary
Methods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotationsMethods inherited from interface dev.civl.abc.ast.node.IF.statement.BlockItemNode
blockItemKindMethods inherited from interface dev.civl.abc.ast.node.IF.statement.StatementNode
statementKind
-
Method Details
-
getGuard
ExpressionNode getGuard()The guard: a boolean expression which must hold in order for the body to be executed.- Returns:
- the guard
-
getBody
StatementNode getBody()The body of this$whenstatement.- Returns:
- the body
-
copy
WhenNode copy()Description copied from interface:ASTNodeReturns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.- Specified by:
copyin interfaceASTNode- Specified by:
copyin interfaceBlockItemNode- Specified by:
copyin interfaceStatementNode- Returns:
- deep copy of this node
-