Class OptionalExpression
java.lang.Object
com.oracle.js.parser.ir.Node
com.oracle.js.parser.ir.Expression
com.oracle.js.parser.ir.OptionalExpression
- All Implemented Interfaces:
Cloneable
Common superclass for nodes that can be an optional expression or part of an optional chain.
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionOptionalExpression(long token, int finish) OptionalExpression(long token, int start, int finish) protectedOptionalExpression(OptionalExpression baseNode) -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanReturnstrueif this is an optional property access or call (a?.b,a?.[b], ora?.()).abstract booleanReturnstrueif this part of an optional chain.Methods 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
accept, accept, clone, equals, getSourceOrder, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toString, toString
-
Constructor Details
-
OptionalExpression
public OptionalExpression(long token, int start, int finish) -
OptionalExpression
public OptionalExpression(long token, int finish) -
OptionalExpression
-
-
Method Details
-
isOptional
public abstract boolean isOptional()Returnstrueif this is an optional property access or call (a?.b,a?.[b], ora?.()). -
isOptionalChain
public abstract boolean isOptionalChain()Returnstrueif this part of an optional chain.
-