Class: EbnfArguments::Arguments

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/pdoc/parser/ebnf_arguments_nodes.rb

Instance Method Summary collapse

Instance Method Details

#rest_arguments_flattenedObject



52
53
54
55
56
# File 'lib/pdoc/parser/ebnf_arguments_nodes.rb', line 52

def rest_arguments_flattened
  rest.elements.inject([]) do |args, e|
    args.concat(e.argument.flatten_nested_args)
  end
end

#to_aObject



48
49
50
# File 'lib/pdoc/parser/ebnf_arguments_nodes.rb', line 48

def to_a
  first_argument.flatten_nested_args + rest_arguments_flattened
end