Docs

Reference

Sections

Reference

Keywords

The Mutant parser recognizes a small core set of keywords that define the language’s control and binding model. Core Keywords fn let true false if else …

Source: docs/BYTECODE_IR.md

Reference

Data Types

Core Mutant types, including primitives, floats, structs, enums, and collection types.

Source: docs/BYTECODE_IR.md

Reference

Variables

Variables are declared with let and may be reassigned according to the language’s binding rules. Example let name = "sakamoto"; let age = 20; let …

Source: docs/BYTECODE_IR.md

Reference

Control Flow

Control flow in Mutant is centered on if and else expressions that map to branching behavior in the compiler and VM. The current language model keeps control …

Source: docs/BYTECODE_IR.md

Reference

Functions

Functions are first-class values used for reusable logic and composition. Example let sum = fn(n1, n2) { return n1 + n2; }; sum(10, 20); Notes Any change in …

Source: docs/BYTECODE_IR.md

Reference

Loops

Mutant currently supports the C-style for loop form. Syntax for (init; condition; post) { body } Each clause is optional, so for (;;) is an infinite loop. …

Source: parser/parse_stmts.go

Reference

Structs

Structs provide lightweight named records with positional field layout. Declaration struct Point { x; y; } Construction and Access let p = Point { x: 10, y: 20 …

Source: compiler/compiler.go

Reference

Enums

Enums define a fixed set of named tags with implicit ordinal values. Declaration enum Color { Red, Green, Blue, } Access Color.Red Notes Enum tags are …

Source: evaluator/evaluator.go

Reference

REPL

The REPL is useful for short experiments and syntax validation before moving to full programs. Try It mutant Notes Keep REPL behavior aligned with upstream …

Source: README.md

Reference

Built-ins

Mutant includes built-ins for core language support, diagnostics, capabilities, filesystem access, networking, scripting, and graph operations. Core Built-ins …

Source: builtin/builtin.go