Crate tlq_fhirpath

Crate tlq_fhirpath 

Source
Expand description

FHIRPath Engine - Production-ready implementation with AST → HIR → VM architecture

This crate provides a complete FHIRPath evaluation engine following the architecture:

  1. Parser → AST (Abstract Syntax Tree)
  2. AST → HIR (High-level Intermediate Representation)
  3. HIR → VM (Virtual Machine with bytecode)

§Architecture Overview

Expression String
     |
  Parser -> AST
     |
Semantic Analysis -> HIR (typed, optimized)
     |
Code Generation -> VM Plan (bytecode)
     |
VM Execution -> Result Collection

Re-exports§

pub use context::Context;
pub use conversion::tlq_fhirpath_value_to_json;
pub use conversion::ToJson;
pub use engine::CompileOptions;
pub use engine::Engine;
pub use engine::EvalOptions;
pub use engine::PipelineVisualization;
pub use error::Error;
pub use error::Result;
pub use resolver::ResourceResolver;
pub use value::Collection;
pub use value::Value;
pub use visualize::VisualizationFormat;
pub use visualize::Visualize;

Modules§

analyzer
ast
Abstract Syntax Tree (AST) representation
codegen
context
Evaluation context for FHIRPath expressions
conversion
FHIRPath Value to JSON conversion
engine
Main FHIRPath engine
error
Error types for FHIRPath engine
functions
Function registry for FHIRPath functions
hir
High-level Intermediate Representation (HIR)
lexer
FHIRPath lexer - tokenizes input strings
parser
FHIRPath parser - converts string expressions to AST
resolver
Resource resolver trait for custom resolve() implementations
token
Token types for the FHIRPath lexer
typecheck
Type checking and resolution pass
types
Type system for FHIRPath
value
Value representation for FHIRPath evaluation
variables
visualize
Visualization utilities for compiler intermediate representations
vm
Virtual Machine for executing compiled FHIRPath expressions