Expand description
The brane-ast
package takes a parsed AST and converts it to one
that is runnable. Specifically, it implements multiple compiler
passes that resolve different things (such as type-safety or data
ownership).
Re-exports§
pub use ast::SymTable;
pub use ast::Workflow;
pub use ast_unresolved::UnresolvedWorkflow;
pub use compile::CompileResult;
pub use compile::CompileStage;
pub use compile::compile_program;
pub use compile::compile_program_to;
pub use compile::compile_snippet;
pub use compile::compile_snippet_to;
pub use data_type::DataType;
pub use errors::AstError as Error;
pub use warnings::AstWarning as Warning;
Modules§
- Defines the
brane-ast
AST, which is defined as an acyclic* graph where the nodes are external, orchestratable and policy-sensitive tasks (e.g., compute tasks or transfer tasks), and the edges are ‘control flow’ that are small pieces of BraneScript that decide which task to compute next. Can be thought of as a graph with intelligent edges. - Contains special patches / overwrites for the normal
brane-ast
AST that make compilation life a super-duper amount easier. - Defines some toplevel functions that run all traversals as desired.
- Defines a DataType enum that is optimized for execution (and transferral along the wire).
- Implements an EdgeBuffer, which is a structure we use to write Edges during compilation.
- Defines the errors for the
brane-ast
crate. - Implements the SnippetFetcher, which will attempt to get multiple lines until a parseable snippet has been reached.
- Implements a better
FunctionId
that does not rely on platform-dependentusize::MAX
to indicate the main function. - Defines a few enums that help analysing location restrictions on a node.
- Defines (public) interfaces and structs for the
brane-ast
crate. - Defines and implements various structures to keep track of the compilation state in between snippet compilation runs.
- Defines the traversals that are part of the compiler.
- Defines warnings for the different compiler stages.
Structs§
- Defines options that configure the compiler before we use it.
- Defines a position in the input text.
- Defines a range (i.e., a span of positions).
Enums§
- Defines merge strategies for the parallel statements.