class Prism::ModuleNode

^^^^^^^^^^^^^^
module Foo end
Represents a module declaration involving the ‘module` keyword.

def self.type

Return a symbol representation of this node type. See `Node::type`.
def self.type
  :module_node
end

def ===(other)

comparing the value of locations. Locations are checked only for presence.
Implements case-equality for the node. This is effectively == but without
def ===(other)
  other.is_a?(ModuleNode) &&
    (locals.length == other.locals.length) &&
    locals.zip(other.locals).all? { |left, right| left === right } &&
    (module_keyword_loc.nil? == other.module_keyword_loc.nil?) &&
    (constant_path === other.constant_path) &&
    (body === other.body) &&
    (end_keyword_loc.nil? == other.end_keyword_loc.nil?) &&
    (name === other.name)
end

def accept(visitor)

def accept: (Visitor visitor) -> void
def accept(visitor)
  visitor.visit_module_node(self)
end

def child_nodes

def child_nodes: () -> Array[nil | Node]
def child_nodes
  [constant_path, body]
end

def comment_targets

def comment_targets: () -> Array[Node | Location]
def comment_targets
  [module_keyword_loc, constant_path, *body, end_keyword_loc] #: Array[Prism::node | Location]
end

def compact_child_nodes

def compact_child_nodes: () -> Array[Node]
def compact_child_nodes
  compact = [] #: Array[Prism::node]
  compact << constant_path
  compact << body if body
  compact
end

def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, module_keyword_loc: self.module_keyword_loc, constant_path: self.constant_path, body: self.body, end_keyword_loc: self.end_keyword_loc, name: self.name)

def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode
def copy(node_id: self.node_id, location: self.location, flags: self.flags, locals: self.locals, module_keyword_loc: self.module_keyword_loc, constant_path: self.constant_path, body: self.body, end_keyword_loc: self.end_keyword_loc, name: self.name)
  ModuleNode.new(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name)
end

def deconstruct_keys(keys)

def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol }
def deconstruct_keys(keys)
  { node_id: node_id, location: location, locals: locals, module_keyword_loc: module_keyword_loc, constant_path: constant_path, body: body, end_keyword_loc: end_keyword_loc, name: name }
end

def end_keyword

def end_keyword: () -> String
def end_keyword
  end_keyword_loc.slice
end

def end_keyword_loc

attr_reader end_keyword_loc: Location
def end_keyword_loc
  location = @end_keyword_loc
  return location if location.is_a?(Location)
  @end_keyword_loc = Location.new(source, location >> 32, location & 0xFFFFFFFF)
end

def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name)

Initialize a new ModuleNode node.
def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name)
  @source = source
  @node_id = node_id
  @location = location
  @flags = flags
  @locals = locals
  @module_keyword_loc = module_keyword_loc
  @constant_path = constant_path
  @body = body
  @end_keyword_loc = end_keyword_loc
  @name = name
end

def inspect

def inspect -> String
def inspect
  InspectVisitor.compose(self)
end

def module_keyword

def module_keyword: () -> String
def module_keyword
  module_keyword_loc.slice
end

def module_keyword_loc

attr_reader module_keyword_loc: Location
def module_keyword_loc
  location = @module_keyword_loc
  return location if location.is_a?(Location)
  @module_keyword_loc = Location.new(source, location >> 32, location & 0xFFFFFFFF)
end

def save_end_keyword_loc(repository)

it can be retrieved later.
Save the end_keyword_loc location using the given saved source so that
def save_end_keyword_loc(repository)
  repository.enter(node_id, :end_keyword_loc)
end

def save_module_keyword_loc(repository)

it can be retrieved later.
Save the module_keyword_loc location using the given saved source so that
def save_module_keyword_loc(repository)
  repository.enter(node_id, :module_keyword_loc)
end

def type

Return a symbol representation of this node type. See `Node#type`.
def type
  :module_node
end