Class ParameterNode
java.lang.Object
com.oracle.js.parser.ir.Node
com.oracle.js.parser.ir.Expression
com.oracle.js.parser.ir.ParameterNode
- All Implemented Interfaces:
Cloneable
IR representation of a positional parameter value. Used for desugaring parameter initialization.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionParameterNode(long token, int finish, int index) ParameterNode(long token, int finish, int index, boolean rest) -
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.intgetIndex()Formal parameter index.booleanIf true, this is a rest parameter.voidtoString(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.Expression
getFinish, getFinishWithoutParens, getStart, getStartWithoutParens, isAlwaysFalse, isAlwaysTrue, isParenthesized, isSelfModifying, makeParenthesizedMethods inherited from class com.oracle.js.parser.ir.Node
clone, equals, getSourceOrder, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toString
-
Constructor Details
-
ParameterNode
public ParameterNode(long token, int finish, int index, boolean rest) -
ParameterNode
public ParameterNode(long token, int finish, int index)
-
-
Method Details
-
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 -
getIndex
public int getIndex()Formal parameter index. -
isRestParameter
public boolean isRestParameter()If true, this is a rest parameter.
-