Class: RBNF::Binary

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

Overview

Binary AST node

Direct Known Subclasses

Alt, Cat, Def, Except, RepN

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, b) ⇒ Binary

Returns a new instance of Binary.



16
17
18
# File 'lib/rbnf/nodes.rb', line 16

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

Instance Attribute Details

#aObject (readonly)

Returns the value of attribute a.



15
16
17
# File 'lib/rbnf/nodes.rb', line 15

def a
  @a
end

#bObject (readonly)

Returns the value of attribute b.



15
16
17
# File 'lib/rbnf/nodes.rb', line 15

def b
  @b
end