class SyntaxTree::Parser
def on_args_add(arguments, argument)
Experimental RBS support (using type sampling data from the type_fusion project).
type SyntaxTree__Parser_on_args_add_argument = SyntaxTree::Int | SyntaxTree::StringLiteral | SyntaxTree::ArrayLiteral | SyntaxTree::VarRef | SyntaxTree::SymbolLiteral | SyntaxTree::CallNode | SyntaxTree::Assign def on_args_add: (SyntaxTree::Args arguments, SyntaxTree__Parser_on_args_add_argument argument) -> untyped
This signature was generated using 47 samples from 1 application.
:call-seq:
def on_args_add(arguments, argument) if arguments.parts.empty? # If this is the first argument being passed into the list of arguments, # then we're going to use the bounds of the argument to override the # parent node's location since this will be more accurate. Args.new(parts: [argument], location: argument.location) else # Otherwise we're going to update the existing list with the argument # being added as well as the new end bounds. Args.new( parts: arguments.parts << argument, location: arguments.location.to(argument.location) ) end end