Class: L43Peg::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/l43_peg/parser.rb

Overview

A wrapper

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fnObject (readonly)

Returns the value of attribute fn.



7
8
9
# File 'lib/l43_peg/parser.rb', line 7

def fn
  @fn
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/l43_peg/parser.rb', line 7

def name
  @name
end

Instance Method Details

#call(input, cache: L43Peg::Cache.new) ⇒ Object

Calls the parse function of this parser instance.

Parameters:



12
13
14
# File 'lib/l43_peg/parser.rb', line 12

def call(input, cache: L43Peg::Cache.new) 
  fn.(input, cache, name)
end