Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 2.66 KB

README.md

File metadata and controls

68 lines (48 loc) · 2.66 KB

Mach language reference

Per-element reference docs. Each file covers one language component; read the index below or follow see also links to navigate.

This directory is the authoritative reference for the locked Mach dialect. Each file is a focused doc with grammar, examples, and neighboring links; start from the index below.

Files and structure

  • files.md — extensions, lib.mach / main.mach conventions
  • modules.md — module tree, path separator, shadow-module pattern
  • use.md — imports
  • fwd.md — re-exports

Declarations

  • visibility.md — pub and ext modifiers
  • decorators.md — codegen decorators, #[name] (symbol, library, inline, align, section)
  • def.md — type alias
  • rec.md — record
  • uni.md — raw union and the discriminated-value convention
  • fun.md — function
  • ext-fun.md — external function
  • val-var.md — immutable and mutable bindings
  • test.md — test declaration and the mach test workflow
  • variadics.md — variadic packs (va: ..., $each, va.len, va...)

Values and types

  • literals.md — numeric, char, string
  • types.md — primitive grammar, compound types
  • secrecy.md — the ^ secret qualifier, flow typing, gates, :^
  • operators.md — arithmetic, bitwise, comparison, logical, pointer, cast
  • expressions.md — construction, access, calls, generic instantiation

Control flow

Comptime channel

Low-level

Formal grammar

  • grammar.md — full EBNF grammar of the implemented dialect, derived from the lexer and parser

Conventions

  • documentation.md — docstring style for functions, types, modules, and values

Build system