Class: RBNF::Unary

Inherits:
Object
  • Object
show all
Includes:
RBNF
Defined in:
lib/rbnf/nodes.rb

Overview

Unary AST node

Direct Known Subclasses

Group, Opt, Rep, Term

Constant Summary

Constants included from RBNF

DEFS, VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RBNF

#=~, [], #alt, #cat, #comps, def, define, dememoize, #except, #group, method_missing, #opt, #rep, #rep_n

Constructor Details

#initialize(a) ⇒ Unary

Returns a new instance of Unary.



7
8
9
# File 'lib/rbnf/nodes.rb', line 7

def initialize(a)
  @a,@memo=a,{}
end

Instance Attribute Details

#aObject (readonly)

Returns the value of attribute a.



6
7
8
# File 'lib/rbnf/nodes.rb', line 6

def a
  @a
end