Class Nodes.CallAndWriteNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.CallAndWriteNode
- Enclosing class:
Nodes
Represents the use of the `&&=` operator on a call.
foo.bar &&= value
^^^^^^^^^^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal shortfinal org.jruby.RubySymbolRepresents the name of the method being called.final Nodes.NodeThe object that the method is being called on.final Nodes.NodeRepresents the value being assigned.final org.jruby.RubySymbolRepresents the name of the method being written to.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionCallAndWriteNode(int startOffset, int length, short flags, Nodes.Node receiver, org.jruby.RubySymbol read_name, org.jruby.RubySymbol write_name, Nodes.Node value) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) booleanbooleanbooleanbooleanprotected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
flags
public final short flags -
receiver
The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). foo.bar &&= value ^^^ -
read_name
public final org.jruby.RubySymbol read_nameRepresents the name of the method being called. foo.bar &&= value # read_name `:bar` ^^^ -
write_name
public final org.jruby.RubySymbol write_nameRepresents the name of the method being written to. foo.bar &&= value # write_name `:bar=` ^^^ -
value
Represents the value being assigned. foo.bar &&= value ^^^^^
-
-
Constructor Details
-
CallAndWriteNode
public CallAndWriteNode(int startOffset, int length, short flags, Nodes.Node receiver, org.jruby.RubySymbol read_name, org.jruby.RubySymbol write_name, Nodes.Node value)
-
-
Method Details
-
isVariableCall
public boolean isVariableCall() -
isAttributeWrite
public boolean isAttributeWrite() -
isIgnoreVisibility
public boolean isIgnoreVisibility() -
visitChildNodes
- Specified by:
visitChildNodesin classNodes.Node
-
childNodes
- Specified by:
childNodesin classNodes.Node
-
accept
- Specified by:
acceptin classNodes.Node
-
toString
- Specified by:
toStringin classNodes.Node