Module: Gisele::Language::Syntax::TrackvarDef

Includes:
Node
Defined in:
lib/gisele/language/syntax/trackvar_def.rb

Instance Method Summary collapse

Methods included from Node

#to_ast, #value

Instance Method Details

#_to_astObject



7
8
9
10
11
12
13
14
# File 'lib/gisele/language/syntax/trackvar_def.rb', line 7

def _to_ast
  name       = captures[:variable_name].first.strip
  init, term = captures[:event_set].map{|x| x.to_ast}
  term       = [:event_set] unless term
  initval    = captures[:initially_def].first
  initval    = (initval && !initval.empty?) ? initval.value : nil
  [:trackvar_def, name, init, term, initval]
end