FusionDSL v0.0.1-dev FusionDsl.Processor.Program View Source

Program struct

Link to this section Summary

Types

AST structure of FusionDsl

List of ast arguments. These args can be immediate values or AST

Context of each AST, Holds data like Line number (:ln)

A single atom in case of internal operations (such as jump, if, noop etc.) Or a tuple of {module_atom, function_name_atom} in case of foreign functions

t()

Structure of a compiled program. contains procedure, configs, name, software and runtime version

Link to this section Types

AST structure of FusionDsl

A tuple with three elements.

  • First: The calling function info.
  • Second: The context of the generated AST.
  • Third: List of arguments for current AST.
Link to this type ast_arg() View Source
ast_arg() :: ast() | integer() | float() | String.t() | map()

List of ast arguments. These args can be immediate values or AST

FusionDsl.Impl.prep_args/2 can be used to get immediate values of ASTs

Link to this type ast_ctx() View Source
ast_ctx() :: {:ln, integer()}

Context of each AST, Holds data like Line number (:ln)

Link to this type ast_fn() View Source
ast_fn() :: atom() | {atom(), atom()}

A single atom in case of internal operations (such as jump, if, noop etc.) Or a tuple of {module_atom, function_name_atom} in case of foreign functions.

Calls to foreign functions will NOT containt module atom and will be a single atom only.

Link to this type t() View Source
t() :: %FusionDsl.Processor.Program{
  config: [Keyword.t()],
  fusion_version: non_neg_integer(),
  name: String.t(),
  procedures: %{optional(String.t()) => [ast()]},
  version: String.t()
}

Structure of a compiled program. contains procedure, configs, name, software and runtime version.