class SyntaxTree::UntilNode
end
until predicate
Until represents an until
loop.
def ===(other)
def ===(other) other.is_a?(UntilNode) && predicate === other.predicate && statements === other.statements end
def accept(visitor)
def accept(visitor) visitor.visit_until(self) end
def child_nodes
def child_nodes [predicate, statements] end
def copy(predicate: nil, statements: nil, location: nil)
def copy(predicate: nil, statements: nil, location: nil) node = UntilNode.new( predicate: predicate || self.predicate, statements: statements || self.statements, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { predicate: predicate, statements: statements, location: location, comments: comments } end
def format(q)
def format(q) LoopFormatter.new("until", self).format(q) end
def initialize(predicate:, statements:, location:)
def initialize(predicate:, statements:, location:) @predicate = predicate @statements = statements @location = location @comments = [] end
def modifier?
def modifier? predicate.location.start_char > statements.location.start_char end