Class BlockStatement
java.lang.Object
com.oracle.js.parser.ir.Node
com.oracle.js.parser.ir.Statement
com.oracle.js.parser.ir.BlockStatement
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(NodeVisitor<? extends LexicalContext> visitor) Provides a means to navigate the IR.<R> Raccept(TranslatorNodeVisitor<? extends LexicalContext, R> visitor) Provides a means to navigate the IR.getBlock()Return the block to be executedbooleanTells if this is a synthetic block statement or not.booleanIs this a terminal statement, i.e.Reset the block to be executedvoidtoString(StringBuilder sb, boolean printType) Print logic that decides whether to show the optimistic type or not - for example it should not be printed after just parse, when it hasn't been computed, or has been set to a trivially provable valueMethods inherited from class com.oracle.js.parser.ir.Statement
getLineNumber, hasGoto, hasTerminalFlags, isCompletionValueNeverEmptyMethods inherited from class com.oracle.js.parser.ir.Node
clone, equals, getFinish, getSourceOrder, getStart, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toString
-
Constructor Details
-
BlockStatement
Constructor- Parameters:
lineNumber- line numberblock- the block to execute
-
-
Method Details
-
isTerminal
public boolean isTerminal()Description copied from class:StatementIs this a terminal statement, i.e. does it end control flow like a throw or return?- Specified by:
isTerminalin interfaceTerminal- Overrides:
isTerminalin classStatement- Returns:
- true if this node statement is terminal
-
isSynthetic
public boolean isSynthetic()Tells if this is a synthetic block statement or not.- Returns:
- true if this is a synthetic statement
-
accept
Description copied from class:NodeProvides a means to navigate the IR. -
accept
Description copied from class:NodeProvides a means to navigate the IR. -
toString
Description copied from class:NodePrint logic that decides whether to show the optimistic type or not - for example it should not be printed after just parse, when it hasn't been computed, or has been set to a trivially provable value -
getBlock
-
setBlock
Reset the block to be executed- Parameters:
block- the block- Returns:
- new or same execute node
-