Package com.darkcollective.relix.lang.ast


package com.darkcollective.relix.lang.ast
Root scripting-language AST — the Script node and the Statement hierarchy.

A parsed .relix file is represented as a Script record containing an optional namespace string and an ordered list of Statements. The six statement kinds are:

  • EnvStatement — env from '...' using '...'; declares the environment file and active profile.
  • ImportStatement — import source X from '...'; pulls symbols from another file.
  • SourceDeclaration — source X from http { ... }; declares a virtual relation backed by an external data source.
  • AssignmentStatement — X := { RA-expr }; or X := [...]; gives a name to a query expression or an inline table.
  • DefStatement — def f(x: NUMBER): NUMBER := { expr }; defines a scalar UDF.
  • QueryStatement — query X; or query { expr }; produces output.

Embedded RA expressions (RelNode) and operand expressions (Operand) are stored as fully parsed objects produced by the relix-parser module; they are not raw strings. This keeps the AST type-safe and lets RA parse errors surface at script-parse time rather than later.