RustQ.Meta.Lower (rustq v0.9.1)

Copy Markdown View Source

Lowers Rusty-Elixir quoted expressions into RustQ AST nodes.

Summary

Functions

callable_return_type(call_ast, opts \\ [])

@spec callable_return_type(
  Macro.t(),
  keyword()
) :: RustQ.Meta.Type.t() | nil

Looks up the known return type for a local or remote call AST.

This is a lowering-time query over the callable metadata supplied through the :callables option. It is intentionally side-effect-free and does not alter lowering yet; type-driven propagation inference will use this lookup to decide when a call returning Result/Option/NifResult should lower with Rust ?.

function_body(body_ast, return_type, vars \\ %{}, opts \\ [])

@spec function_body(Macro.t(), RustQ.Meta.Type.t(), map(), keyword()) :: String.t()

quoted_body(body_ast, return_type, vars \\ %{}, opts \\ [])

@spec quoted_body(Macro.t(), RustQ.Meta.Type.t() | nil, map(), keyword()) :: [
  struct()
]