2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
|
# File 'lib/activefacts/cql/parser/FactTypes.rb', line 2362
def ast
if !q.empty? && q.quantifier.value
quantifier = q.ast
end
if !lr.empty?
if lr.respond_to?(:literal)
literal = Compiler::Literal.new(lr.literal.value, lr.u.empty? ? nil : lr.u.text_value)
end
value_constraint = Compiler::ValueConstraint.new(lr.value_constraint.ast, lr.enforcement.ast) if lr.respond_to?(:value_constraint)
raise "It is not permitted to provide both a literal value and a value constraint" if value_constraint and literal
end
nested_clauses =
if oj.empty?
nil
else
ast = oj.ast
ast[0].conjunction = 'where'
ast
end
player.ast(quantifier, value_constraint, literal, nested_clauses)
end
|