Module: Gisele::Language::Syntax::IfSt

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

Instance Method Summary collapse

Methods included from Node

#to_ast, #value

Instance Method Details

#_to_astObject



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

def _to_ast
  cond    = captures[:bool_expr].first.to_ast
  dost    = captures[:process_statement].first.to_ast
  elsifs  = captures[:elsif_clause].map{|x| x.to_ast}
  els     = captures[:else_clause].map{|x| x.to_ast}
  [:if_st, cond, dost] + elsifs + els
end