Skip to main content

hexicon_compiler/
lib.rs

1//! The Hexicon compiler.
2//!
3//! [`compile_program`] turns the source files of a program into a
4//! program image, and [`compile`] does the same for a program that is
5//! one file. The preprocessor ([`pp`]) can also be used on its own.
6//! [`read_project`] reads what to build from the command line of
7//! `hexicon build` and the manifests (`hexicon.toml`) it names.
8//!
9//! The compiler has no access to files, to a clock, or to a console of
10//! its own; whoever uses it supplies the files through
11//! [`pp::SourceFiles`] and decides what to do with what comes out.
12
13mod ast;
14pub mod builtin;
15mod codegen;
16mod compile;
17mod docs;
18pub mod dynamic;
19mod emit;
20pub mod english;
21mod flow;
22mod fold;
23pub mod ifid;
24mod image;
25mod lex;
26mod link;
27mod manifest;
28mod names;
29mod parse;
30pub mod pp;
31mod project;
32mod tags;
33mod wording;
34
35pub use compile::{
36    CompileOptions, Compiled, RuntimeSymbol, RuntimeValue, Shown, compile, compile_and_document,
37    compile_program, shown, with_preprocessor,
38};
39pub use docs::{
40    DocEnum, DocFile, DocFunction, DocMacro, DocMember, DocMessage, DocObject, DocPlace,
41    DocTemplate, DocUse, DocVerb, Documented, document,
42};
43pub use lex::Tok;
44pub use manifest::MANIFEST;
45pub use project::{
46    DirEntry, Project, ProjectError, ProjectPaths, Resource, ResourceSpec, expand_resources,
47    read_project,
48};
49
50#[cfg(test)]
51mod tests;