cflmy 2e49c7b855 feat(runtime): tree-walk interpreter for Marqdo IR
Blueprint sections 7.2 and 3: Marqdo executes with its own Rust interpreter.

- Frames with isolated scopes, named/positional argument binding, explicit
  signature rules, compile-time constant defaults evaluated in an empty frame.
- Statements: assignment, expression statements, link-form calls, branch
  (first true arm), loop (condition re-evaluated, return propagates), return.
- Expressions: exact Int arithmetic, `/` always Float, mixed arithmetic Float,
  exact Int/Float comparisons via rationals, Text concatenation, short-circuit
  and/or, Bool-only conditions, indexes with negative positions, map/Formula/
  Code member access, calls (same module, imports, FunctionRef values).
- Builtins: print/len/type/str/int/float/table/ref plus capability-host
  dispatch for math.*, foreign.*, fs.*; `ref` resolves functions or exactly one
  inert resource and errors on ambiguity instead of picking the first.
- Fuel, stack-depth and wall-clock budgets are enforced; call errors carry a
  structured stack of frames.
- End-to-end tests: recursion, loops, explicit positional signatures, builtins,
  function references, non-Bool conditions, fuel/stack exhaustion, ambiguous
  references.
2026-11-20 10:43:59 +08:00
2026-11-20 09:31:20 +08:00
2026-11-20 09:31:20 +08:00
2026-11-20 09:31:20 +08:00

Marqdo CLI — next-generation design starter

Design-only starter package. This archive does not contain an executable CLI or a completed Rust implementation.

Marqdo aims to be a Markdown-native, independently interpreted programming language: Markdown AST structures carry program control semantics; readable prose can coexist with execution, while runtime effects are explicit and controlled. The new toolchain is independent of the original cflmy/marqdo repository.

Read first

  • docs/DEVELOPMENT_BLUEPRINT.md — the comprehensive Chinese design and development specification: motivation, formal mapping, functions/parameters/calls/returns, execution, references, Math/Foreign kernels, environment and package manager, sandbox, plugin ABI/SDK, milestones, tests and related projects.
  • AGENTS.md — succinct onboarding instructions for coding agents and new contributors.

Planned CLI surface

marqdo init
marqdo run index.mq.md
marqdo call index.mq.md main
marqdo check index.mq.md
marqdo inspect index.mq.md --ast
marqdo add <package>
marqdo lock && marqdo sync
marqdo plugin inspect <artifact>

These commands are planned APIs, not yet available in this starter package. Begin by implementing P0 tests and a reference Markdown AST explorer; do not start with a monolithic CLI or port old parser heuristics.

Design status

The language direction and architecture principles have been selected. Detailed proposals still require ADRs and conformance testing before a stable version. See blueprint section 17 for unresolved items and section 18 for the Alpha definition of done.

References

S
Description
No description provided
Readme
3.3 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 94.1%
Python 3.5%
C 2%
Shell 0.4%