Skip to main content

Module compile_path

Module compile_path 

Source
Expand description

FHIRPath expression → SqlExpr compiler.

Walks the AST produced by helios_fhirpath::parser::parser() and emits a dialect-independent SqlExpr. The translation covers the subset needed by the SoF v2 conformance corpus, expanded one feature at a time across stages 2–5.

§Coverage by stage

  • Stage 2 (this file’s current state): literals, member navigation, bracket indexing, comparison & logical operators, polarity, basic function calls (exists, empty, count, first, last, iif, not, ofType primitive), $this.
  • Stage 3: focus-as-collection threading (.where(...).select(...) chains that nest into lateral subqueries).
  • Stage 4: %name constants bound as parameters, extension(url), reference keys, ofType(complex), join(sep).
  • Stage 5: lowBoundary / highBoundary.

Structs§

CompileEnv
Compile-time environment threaded through expression lowering.
Constant
A ViewDefinition.constant[] entry resolved to a typed value.

Functions§

compile_fhirpath_expr
Parse src and compile it to SqlExpr.