class SyntaxTree::Parser
def on_array(contents)
Experimental RBS support (using type sampling data from the type_fusion project).
def on_array: (SyntaxTree::Args contents) -> untyped
This signature was generated using 1 sample from 1 application.
on_array: ((nil | Args) contents) ->
:call-seq:
def on_array(contents) if !contents || contents.is_a?(Args) lbracket = consume_token(LBracket) rbracket = consume_token(RBracket) ArrayLiteral.new( lbracket: lbracket, contents: contents, location: lbracket.location.to(rbracket.location) ) else tstring_end = consume_tstring_end(contents.beginning.location) contents.class.new( beginning: contents.beginning, elements: contents.elements, location: contents.location.to(tstring_end.location) ) end end