class Parser::CurrentArgStack
Stack that holds names of current arguments, i.e. while parsing
def m1(a = (def m2(b = def m3(c = 1); end); end)); end ^
stack is [:a, :b, :c]
Emulates ‘p->cur_arg` in MRI’s parse.y
@api private
Attributes
Public Class Methods
Public Instance Methods
Source
# File lib/parser/current_arg_stack.rb, line 26 def push(value) @stack << value end
Source
# File lib/parser/current_arg_stack.rb, line 30 def set(value) @stack[@stack.length - 1] = value end