class SyntaxTree::PinnedBegin
end
in ^(statement)
case value
PinnedBegin represents a pinning a nested statement within pattern matching.
def ===(other)
def ===(other) other.is_a?(PinnedBegin) && statement === other.statement end
def accept(visitor)
def accept(visitor) visitor.visit_pinned_begin(self) end
def child_nodes
def child_nodes [statement] end
def copy(statement: nil, location: nil)
def copy(statement: nil, location: nil) node = PinnedBegin.new( statement: statement || self.statement, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { statement: statement, location: location, comments: comments } end
def format(q)
def format(q) q.group do q.text("^(") q.nest(1) do q.indent do q.breakable_empty q.format(statement) end q.breakable_empty q.text(")") end end end
def initialize(statement:, location:)
def initialize(statement:, location:) @statement = statement @location = location @comments = [] end