tiny.python.compile
Defined in tiny.python.
The package's third stage turns a program's syntax tree into bytecode for the package's stack machine.
API (2)
Actions
Public operations.
compile: Compiles a parsed program into a new top-level chunk that ends withret.
Namespaces
Public namespaces.
compiler: The compiler walks a program's syntax tree once, in source order, and appends stack-machine instructions to a chunk as it goes.
Source
Source: lib/python/src/compile/root.zig
zig
//! The package's third stage turns a program's syntax tree into bytecode for the package's stack//! machine. Each statement and expression has to become a run of stack-machine instructions with//! the same effect, with jumps in place of the program's control flow.//!//! The namespace re-exports the file `compiler` and its function `compile`. The package's `execute`//! calls `compile` right after `parse` and runs the `Chunk` it returns.pub const compiler = @import("compiler.zig");pub const compile = compiler.compile;Source: lib/python/src/root.zig:92
zig
pub const compile = @import("compile/root.zig");Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |