Class AccessNode
java.lang.Object
com.oracle.js.parser.ir.Node
com.oracle.js.parser.ir.Expression
com.oracle.js.parser.ir.OptionalExpression
com.oracle.js.parser.ir.BaseNode
com.oracle.js.parser.ir.AccessNode
- All Implemented Interfaces:
FunctionCall, Cloneable
IR representation of a property access (period operator.)
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAccessNode(long token, int finish, Expression base, com.oracle.truffle.api.strings.TruffleString property) AccessNode(long token, int finish, Expression base, com.oracle.truffle.api.strings.TruffleString property, boolean isSuper, boolean isPrivate, boolean optional, boolean optionalChain) Constructor -
Method Summary
Modifier and TypeMethodDescriptionaccept(NodeVisitor<? extends LexicalContext> visitor) Assist in IR navigation.<R> Raccept(TranslatorNodeVisitor<? extends LexicalContext, R> visitor) Provides a means to navigate the IR.com.oracle.truffle.api.strings.TruffleStringGet the property namecom.oracle.truffle.api.strings.TruffleStringbooleanMark this node as being a SuperProperty access.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 BaseNode
getBase, isFunction, isIndex, isOptional, isOptionalChain, isSuperMethods inherited from class Expression
getFinish, getFinishWithoutParens, getStart, getStartWithoutParens, isAlwaysFalse, isAlwaysTrue, isParenthesized, isSelfModifying, makeParenthesizedMethods inherited from class Node
clone, equals, getSourceOrder, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toString
-
Constructor Details
-
AccessNode
public AccessNode(long token, int finish, Expression base, com.oracle.truffle.api.strings.TruffleString property, boolean isSuper, boolean isPrivate, boolean optional, boolean optionalChain) Constructor- Parameters:
token- tokenfinish- finishbase- base nodeproperty- property
-
AccessNode
public AccessNode(long token, int finish, Expression base, com.oracle.truffle.api.strings.TruffleString property)
-
-
Method Details
-
accept
Assist in IR navigation. -
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 -
getProperty
-
getPropertyTS
public com.oracle.truffle.api.strings.TruffleString getPropertyTS() -
isPrivate
public boolean isPrivate() -
getPrivateName
-
getPrivateNameTS
public com.oracle.truffle.api.strings.TruffleString getPrivateNameTS() -
setIsSuper
Description copied from class:BaseNodeMark this node as being a SuperProperty access.- Specified by:
setIsSuperin classBaseNode
-