class SyntaxTree::Parser
def on_module(constant, bodystmt)
Experimental RBS support (using type sampling data from the type_fusion
project).
def on_module: (SyntaxTree::ConstRef constant, SyntaxTree::BodyStmt bodystmt) -> untyped
This signature was generated using 3 samples from 1 application.
BodyStmt bodystmt
(ConstPathRef | ConstRef | TopConstRef) constant,
on_module: (
:call-seq:
def on_module(constant, bodystmt) beginning = consume_keyword(:module) ending = consume_keyword(:end) start_char = find_next_statement_start(constant.location.end_char) bodystmt.bind( self, start_char, start_char - line_counts[constant.location.start_line - 1].start, ending.location.start_char, ending.location.start_column ) ModuleDeclaration.new( constant: constant, bodystmt: bodystmt, location: beginning.location.to(ending.location) ) end