Class Statement
java.lang.Object
com.oracle.js.parser.ir.Node
com.oracle.js.parser.ir.Statement
- Direct Known Subclasses:
BlockStatement, CatchNode, DebuggerNode, EmptyNode, ExpressionStatement, IfNode, JumpStatement, LabelNode, LoopNode, ReturnNode, SwitchNode, ThrowNode, TryNode, VarNode, WithNode
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturn the line numberbooleanhasGoto()final booleanCheck if this statement has terminal flags, i.e.booleanbooleanIs this a terminal statement, i.e.
-
Constructor Details
-
Statement
public Statement(int lineNumber, long token, int finish) Constructor- Parameters:
lineNumber- line numbertoken- tokenfinish- finish
-
Statement
public Statement(int lineNumber, long token, int start, int finish) Constructor- Parameters:
lineNumber- line numbertoken- tokenstart- startfinish- finish
-
Statement
-
-
Method Details
-
getLineNumber
public int getLineNumber()Return the line number- Returns:
- line number
-
isTerminal
public boolean isTerminal()Is this a terminal statement, i.e. does it end control flow like a throw or return?- Specified by:
isTerminalin interfaceTerminal- Returns:
- true if this node statement is terminal
-
hasGoto
-
hasTerminalFlags
public final boolean hasTerminalFlags()Check if this statement has terminal flags, i.e. ends or breaks control flow- Returns:
- true if has terminal flags
-
isCompletionValueNeverEmpty
public boolean isCompletionValueNeverEmpty()- Returns:
- true if the completion value of this statement is never the value
empty
-