Method: Yadriggy::Syntax#initialize

Defined in:
lib/yadriggy/syntax.rb

#initialize(ast) ⇒ Syntax

Returns a new instance of Syntax.

Parameters:

  • ast (ASTree)

    the grammar rules.



60
61
62
63
64
65
66
# File 'lib/yadriggy/syntax.rb', line 60

def initialize(ast)
  @error_loc = nil
  @error_msg = nil
  @debug = false
  @hash = {}
  update_hash(ast.tree.body)
end