class SyntaxTree::Retry

Retry represents the use of the retry keyword.

retry

Attributes

comments[R]
Array[ Comment | EmbDoc ]

the comments attached to this node

Public Class Methods

new(location:) click to toggle source
# File lib/syntax_tree/node.rb, line 9664
def initialize(location:)
  @location = location
  @comments = []
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 9694
def ===(other)
  other.is_a?(Retry)
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 9669
def accept(visitor)
  visitor.visit_retry(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 9673
def child_nodes
  []
end
Also aliased as: deconstruct
copy(location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 9677
def copy(location: nil)
  node = Retry.new(location: location || self.location)

  node.comments.concat(comments.map(&:copy))
  node
end
deconstruct()
Alias for: child_nodes
deconstruct_keys(_keys) click to toggle source
# File lib/syntax_tree/node.rb, line 9686
def deconstruct_keys(_keys)
  { location: location, comments: comments }
end
format(q) click to toggle source
# File lib/syntax_tree/node.rb, line 9690
def format(q)
  q.text("retry")
end