class SyntaxTree::ZSuper

ZSuper represents the bare super keyword with no arguments.

super

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 12347
def initialize(location:)
  @location = location
  @comments = []
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 12377
def ===(other)
  other.is_a?(ZSuper)
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 12352
def accept(visitor)
  visitor.visit_zsuper(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 12356
def child_nodes
  []
end
Also aliased as: deconstruct
copy(location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 12360
def copy(location: nil)
  node = ZSuper.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 12369
def deconstruct_keys(_keys)
  { location: location, comments: comments }
end
format(q) click to toggle source
# File lib/syntax_tree/node.rb, line 12373
def format(q)
  q.text("super")
end