A Range in a boolean expression (named after a FlipFlop component in electronic?).
Accept for the visitor pattern.
| name | type | description |
|---|---|---|
| i_visitor | org.jruby.ast.visitor.NodeVisitor<T> | the visitor |
Gets the beginNode. beginNode will set the FlipFlop the first time it is true
Returns: Returns a Node
getDepth() · also: get_depthHow many scopes should we burrow down to until we need to set the block variable value.
Returns: 0 for current scope, 1 for one down, ...
Gets the endNode. endNode will reset the FlipFlop when it is true while the FlipFlop is set.
Returns: Returns a Node
isExclusive() · also: is_exclusiveGets the exclusive. if the range is a 2 dot range it is false if it is a three dot it is true
Returns: Returns a boolean
getIndex() · also: get_indexGets the index within the scope construct that actually holds the eval'd value of this local variable
Returns: Returns an int offset into storage structure
containsVariableAssignment()Does this node or one of its children contain an assignment?
executesOnce()Returns: is it possible this node will execute only once. Note: This is not comprehensive. It is used to look from root node down to class/module nodes to make sure that narrow case can execute once. It is possible much deeper down the tree some nodes can only execute once but it will be marked as false because that case is not what this is for.
getFile() · also: get_filegetLine() · also: get_linesetLine(int line) · also: set_lineneedsDefinitionCheck()Check whether the given node is considered always "defined" or whether it has some form of definition check.
Returns: Whether the type of node represents a possibly undefined construct
isNewline() · also: is_newlineisNil() · also: is_nilWhether the node evaluates to nil and has no side effects.
Returns: true if nil, false otherwise
setNewline()toString()toString(boolean indent, int indentation)toStringExtraInfo()Not all interesting info in the AST is from Node data. This method will print out anything else of note (e.g. FixnumNode's long value).
Returns: null for no extra info or something otherwise.
unsetNewline()