Documentation
¶
Index ¶
- Constants
- func CompileFile(filename string, output string)
- func CompileFileOptions(filename string, output string, stripSource bool)
- func Execute()
- func RunBytecode(filename string)
- func RunFile(filename string)
- func RunFileAST(filename string, minPoliteness float64)
- func RunFileIVM(filename string, minPoliteness float64)
- func StartREPL()
- func TranspileFile(filename string)
Constants ¶
const Version = "v1.2.1"
Variables ¶
This section is empty.
Functions ¶
func CompileFile ¶
CompileFile compiles an English source file to bytecode, embedding the original source as a trailing section (for later transpilation). This is a convenience wrapper around CompileFileOptions.
func CompileFileOptions ¶
CompileFileOptions compiles an English source file to bytecode. When stripSource is true the source trailer is omitted, producing a smaller file; "english transpile" will then fall back to opcode decompilation.
func RunBytecode ¶
func RunBytecode(filename string)
func RunFile ¶
func RunFile(filename string)
RunFile executes an English source file using the instruction VM (ivm) by default. This is a convenience wrapper for RunFileIVM.
func RunFileAST ¶
RunFileAST parses and executes an English source file via the tree-walk evaluator. Use the --vm=ast flag on the run command to select this path. minPoliteness is the minimum required politeness percentage (0–100); pass a negative value to disable the check.
func RunFileIVM ¶
RunFileIVM parses and executes an English source file via the instruction-based VM. It is the default execution path for .abc source files. minPoliteness is the minimum required politeness percentage (0–100); pass a negative value to disable the check.
func TranspileFile ¶
func TranspileFile(filename string)
TranspileFile validates an English source or bytecode file and transpiles it to Python. This is a convenience wrapper that defaults to non-inline mode (each imported .abc file becomes a sibling .py file). The output file has the source filename with its extension replaced by ".py".
examples/fizzbuzz.abc → examples/fizzbuzz.py examples/fizzbuzz.101 → examples/fizzbuzz.py
Types ¶
This section is empty.