public abstract class BaseNode extends OptionalExpression implements FunctionCall
AccessNode,
IndexNode| Modifier and Type | Field and Description |
|---|---|
protected Expression |
base
Base Node.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BaseNode(BaseNode baseNode,
Expression base,
boolean isSuper,
boolean optional,
boolean optionalChain)
Copy constructor for immutable nodes
|
|
BaseNode(long token,
int finish,
Expression base,
boolean isSuper,
boolean optional,
boolean optionalChain)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
getBase()
Get the base node for this access
|
boolean |
isFunction()
Returns true if the value of this expression will be treated as a function and immediately
invoked.
|
boolean |
isIndex()
Return true if this node represents an index operation normally represented as
IndexNode. |
boolean |
isOptional()
Returns
true if this is an optional property access (a?.b or a?.[b]). |
boolean |
isOptionalChain()
Returns
true if this part of an optional chain. |
boolean |
isSuper() |
abstract BaseNode |
setIsSuper()
Mark this node as being a SuperProperty access.
|
getFinish, getFinishWithoutParens, getStart, getStartWithoutParens, isAlwaysFalse, isAlwaysTrue, isParenthesized, isSelfModifying, makeParenthesizedaccept, accept, clone, equals, getSourceOrder, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toString, toStringprotected final Expression base
public BaseNode(long token,
int finish,
Expression base,
boolean isSuper,
boolean optional,
boolean optionalChain)
token - tokenfinish - finishbase - base nodeisSuper - is this a super property accessprotected BaseNode(BaseNode baseNode, Expression base, boolean isSuper, boolean optional, boolean optionalChain)
baseNode - node to inherit frombase - baseisSuper - is this a super property accesspublic Expression getBase()
public boolean isFunction()
FunctionCallisFunction in interface FunctionCallpublic boolean isSuper()
true if this is a super property access.public boolean isIndex()
IndexNode.public abstract BaseNode setIsSuper()
public final boolean isOptional()
true if this is an optional property access (a?.b or a?.[b]).isOptional in class OptionalExpressionpublic final boolean isOptionalChain()
OptionalExpressiontrue if this part of an optional chain.isOptionalChain in class OptionalExpression