class Racc::UserAction

属性

proc[R]
source[R]

公共类方法

empty() 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 742
def UserAction.empty
  new(nil, nil)
end
new(src, proc) 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 748
def initialize(src, proc)
  @source = src
  @proc = proc
end
proc(pr = nil, &block) 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 735
def UserAction.proc(pr = nil, &block)
  if pr and block
    raise ArgumentError, "both of argument and block given"
  end
  new(nil, pr || block)
end
source_text(src) 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 731
def UserAction.source_text(src)
  new(src, nil)
end

公共实例方法

empty?() 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 764
def empty?
  not @proc and not @source
end
inspect()
别名:name
name() 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 768
def name
  "{action type=#{@source || @proc || 'nil'}}"
end
也别名为: inspect
proc?() 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 760
def proc?
  not @source
end
source?() 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 756
def source?
  not @proc
end