lib/python/src/code/root.zig

daab053ee43316e1809a84551d573ddd1e5bf3d2

 1 //! The package's compiled form of a program: a list of instructions for a stack machine, with
 2 //! tables of the constants, names and function bodies the instructions refer to. The compiler needs
 3 //! a form it can append to during one walk over the syntax tree, and the virtual machine needs a
 4 //! form it can run directly, one instruction at a time.
 5 //!
 6 //! The file `chunk` defines `Chunk`, `Instruction` and `Function`, and the file `op` defines `Op`,
 7 //! the set of operations. The namespace re-exports those four names. The compiler returns a
 8 //! `Chunk`, and the virtual machine runs it.
 9 pub const chunk = @import("chunk.zig");
10 pub const op = @import("op.zig");
11 
12 pub const Chunk = chunk.Chunk;
13 pub const Function = chunk.Function;
14 pub const Instruction = chunk.Instruction;
15 pub const Op = op.Op;