Module: ActiveFacts::CQL::FactTypes::QualifiedClauses1

Defined in:
lib/activefacts/cql/parser/FactTypes.rb

Instance Method Summary collapse

Instance Method Details

#ast(conjunction = nil) ⇒ Object



697
698
699
700
701
702
703
704
705
706
# File 'lib/activefacts/cql/parser/FactTypes.rb', line 697

def ast(conjunction = nil)
  r = contracted_clauses.ast  # An array of clause asts
  r[0].conjunction = conjunction
  # pre-qualifiers apply to the first clause, post_qualifiers and context_note to the last
  # REVISIT: This may be incorrect where the last is a nested clause
  r[0].certainty = certainty.value
  r[-1].qualifiers += p.list unless p.empty?
  r[-1].context_note = c.ast unless c.empty?
  r
end