Cooper.Actions (Cooper v0.1.0)

Copy Markdown

Ichor.Actions for casc.aether. Turns the raw parse into:

  • a native Elixir term for every leaf value;
  • a flat list of {:op, %Cooper.Op{}} / {:var, %Cooper.VarDecl{}} entries for every statement, dotted paths and nested blocks already flattened into each op's path, :file included -- assembling that list into a %{} is a separate step (Cooper.Merge.assemble/1; see that module's moduledoc), deliberately not done here, so Cooper.Loader can recursively parse an imported file with this same module and splice its entries into the importer's own list instead of un-folding an already-assembled map.

Interpolation (@{...}, ${...}, %{...}, !{...}, !Name(...)) is resolved into unresolved Cooper.Ref.* AST nodes here, not fully resolved -- that's Cooper.Resolver's job, once a variable environment and the final merged tree exist. A bare, whole-value ref (region = ${REGION}) is built directly below; a ref embedded in a double-quoted string's content is redispatched through Cooper.InterpGrammar (see its own moduledoc for why that's a separate grammar).