Unary
represents a unary method being called on an expression, as in +!+ or +~+.
!valueAttributes
the operator being used
Node
the statement on which to operate
def initialize(operator:, statement:, location:) @operator = operator @statement = statement @location = location @comments = [] endPublic Instance Methods Source
def ===(other) other.is_a?(Unary) && operator === other.operator && statement === other.statement endSource
def accept(visitor) visitor.visit_unary(self) endSource
def child_nodes [statement] endSource
def copy(operator: nil, statement: nil, location: nil) node = Unary.new( operator: operator || self.operator, statement: statement || self.statement, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node endSource
def deconstruct_keys(_keys) { operator: operator, statement: statement, location: location, comments: comments } endSource
def format(q) q.text(operator) q.format(statement) end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4