| Constructor and Description |
|---|
CatchNode(int lineNumber,
long token,
int finish,
IdentNode exception,
Expression pattern,
Expression exceptionCondition,
Block body,
boolean isSyntheticRethrow)
Constructors
|
| Modifier and Type | Method and Description |
|---|---|
Node |
accept(NodeVisitor<? extends LexicalContext> visitor)
Assist in IR navigation.
|
<R> R |
accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Provides a means to navigate the IR.
|
Block |
getBody()
Get the body for this catch block
|
Expression |
getDestructuringPattern()
Get the exception destructuring pattern for this catch block
|
Expression |
getException()
Get the identifier representing the exception thrown
|
Expression |
getExceptionCondition()
Get the exception condition for this catch block
|
boolean |
isSyntheticRethrow()
Is this catch block a non-JavaScript constructor, for example created as part of the rethrow
mechanism of a finally block in Lower? Then we just pass the exception on and need not unwrap
whatever is in the ECMAException object catch symbol
|
boolean |
isTerminal()
Is this a terminal statement, i.e.
|
CatchNode |
setDestructuringPattern(Expression pattern)
Resets the exception destructuring pattern of a catch block
|
CatchNode |
setException(IdentNode exception)
Resets the exception of a catch block
|
CatchNode |
setExceptionCondition(Expression exceptionCondition)
Reset the exception condition for this catch block
|
void |
toString(StringBuilder sb,
boolean printTypes)
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 value
|
getLineNumber, hasGoto, hasTerminalFlags, isCompletionValueNeverEmptyclone, equals, getFinish, getSourceOrder, getStart, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toStringpublic CatchNode(int lineNumber,
long token,
int finish,
IdentNode exception,
Expression pattern,
Expression exceptionCondition,
Block body,
boolean isSyntheticRethrow)
lineNumber - lineNumbertoken - tokenfinish - finishexception - variable name of exceptionpattern - catch parameter destructuring assignmentexceptionCondition - exception conditionbody - catch bodyisSyntheticRethrow - true if this node is a synthetically generated rethrow node.public Node accept(NodeVisitor<? extends LexicalContext> visitor)
public <R> R accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Nodepublic boolean isTerminal()
StatementisTerminal in interface TerminalisTerminal in class Statementpublic void toString(StringBuilder sb, boolean printTypes)
Nodepublic Expression getException()
public Expression getExceptionCondition()
public CatchNode setExceptionCondition(Expression exceptionCondition)
exceptionCondition - the new exception conditionpublic Block getBody()
public CatchNode setException(IdentNode exception)
exception - new exceptionpublic Expression getDestructuringPattern()
public CatchNode setDestructuringPattern(Expression pattern)
pattern - new patternpublic boolean isSyntheticRethrow()