class SyntaxTree::Parser
def on_paren(contents)
Experimental RBS support (using type sampling data from the type_fusion
project).
def on_paren: (SyntaxTree::Params contents) -> untyped
This signature was generated using 6 samples from 1 application.
:call-seq:
def on_paren(contents) lparen = consume_token(LParen) rparen = consume_token(RParen) if contents.is_a?(Params) location = contents.location start_char = find_next_statement_start(lparen.location.end_char) location = Location.new( start_line: location.start_line, start_char: start_char, start_column: start_char - line_counts[lparen.location.start_line - 1].start, end_line: location.end_line, end_char: rparen.location.start_char, end_column: rparen.location.start_column ) contents = Params.new( requireds: contents.requireds, optionals: contents.optionals, rest: contents.rest, posts: contents.posts, keywords: contents.keywords, keyword_rest: contents.keyword_rest, block: contents.block, location: location ) end Paren.new( lparen: lparen, contents: contents || nil, location: lparen.location.to(rparen.location) ) end