farmbot v6.4.1 Farmbot.CeleryScript.AST View Source

Handy functions for turning various data types into Farbot Celery Script Ast nodes.

Link to this section Summary

Types

Arguments to a Node

Body of a Node

Kind of a Node

t()

AST node

Functions

Try to decode anything into an AST struct

Encode a AST back to a map

Encode a list of asts

Lookup a module by it’s kind

Change a module back to a kind

Link to this section Types

Arguments to a Node.

Body of a Node.

Kind of a Node.

Link to this type t() View Source
t() :: %Farmbot.CeleryScript.AST{
  args: args(),
  body: body(),
  comment: binary(),
  kind: kind()
}

AST node.

Link to this section Functions

Try to decode anything into an AST struct.

Encode a AST back to a map.

Link to this function encode_body(body, acc \\ []) View Source

Encode a list of asts.

Lookup a module by it’s kind.

Change a module back to a kind.