Class: Gisele::Analysis::Compiling::Ast2Session

Inherits:
Sexpr::Processor
  • Object
show all
Defined in:
lib/gisele/analysis/compiling/ast2session.rb

Instance Method Summary collapse

Instance Method Details

#on_fluent_def(sexpr) ⇒ Object



19
20
21
22
# File 'lib/gisele/analysis/compiling/ast2session.rb', line 19

def on_fluent_def(sexpr)
  name, inits, terms, initially = apply_all(sexpr.sexpr_body)
  @session.fluent name.to_sym, inits, terms, initially
end

#on_missing(sexpr) ⇒ Object



15
16
17
# File 'lib/gisele/analysis/compiling/ast2session.rb', line 15

def on_missing(sexpr)
  apply_all(sexpr.sexpr_body)
end

#on_trackvar_def(sexpr) ⇒ Object



24
25
26
27
# File 'lib/gisele/analysis/compiling/ast2session.rb', line 24

def on_trackvar_def(sexpr)
  name, updates, obsoletes, initially = apply_all(sexpr.sexpr_body)
  @session.trackvar name.to_sym, updates, initially
end

#on_unit_def(sexpr) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/gisele/analysis/compiling/ast2session.rb', line 6

def on_unit_def(sexpr)
  @session = Session.new
  apply_all(sexpr.sexpr_body)
  @session
rescue
  @session.close if @session
  raise
end