cmd

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

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

func CompileFile(filename string, output string)

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

func CompileFileOptions(filename string, output string, stripSource bool)

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 Execute

func Execute()

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

func RunFileAST(filename string, minPoliteness float64)

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

func RunFileIVM(filename string, minPoliteness float64)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL