Parent

RubyParser::StackState

Attributes

stack[R]

Public Class Methods

new(name) click to toggle source
     # File lib/ruby_parser_extras.rb, line 969
969:     def initialize(name)
970:       @name = name
971:       @stack = [false]
972:     end

Public Instance Methods

inspect() click to toggle source
     # File lib/ruby_parser_extras.rb, line 974
974:     def inspect
975:       "StackState(#{@name}, #{@stack.inspect})"
976:     end
is_in_state() click to toggle source
     # File lib/ruby_parser_extras.rb, line 978
978:     def is_in_state
979:       @stack.last
980:     end
lexpop() click to toggle source
     # File lib/ruby_parser_extras.rb, line 982
982:     def lexpop
983:       raise if @stack.size == 0
984:       a = @stack.pop
985:       b = @stack.pop
986:       @stack.push(a || b)
987:     end
pop() click to toggle source
     # File lib/ruby_parser_extras.rb, line 989
989:     def pop
990:       r = @stack.pop
991:       @stack.push false if @stack.size == 0
992:       r
993:     end
push(val) click to toggle source
     # File lib/ruby_parser_extras.rb, line 995
995:     def push val
996:       @stack.push val
997:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.