Documentation
¶
Index ¶
- func CheckForUpdates()
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForUpdates ¶ added in v1.4.0
func CheckForUpdates()
CheckForUpdates queries the GitHub releases API and prints whether a newer version of the English interpreter is available. It never downloads or installs anything automatically.
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 StartREPL ¶
func StartREPL()
StartREPL starts the interactive Read-Eval-Print Loop using the repl package. Color is automatically enabled when the terminal supports ANSI codes (TTY, no NO_COLOR env var).
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.