If/else arms that all bind a local (e.g. # llm key/url/mdl/nm) no longer leak it into constructor params. This fixes the missing `key` error in llm.create and restores the agent/llm gold tests. Adds a regression test.
Design §8.2 treats the first bold assignment as a declaration, but merging only walked backtick mentions, so n = n + 1 never entered the signature.
Co-authored-by: Cursor <cursoragent@cursor.com>
Bare tables in a function body evaluate as collections without requiring
a name bind; restores welcome-page install tables.
Co-authored-by: Cursor <cursoragent@cursor.com>
--dump-lines tags [decl]/[bold]/[italic]; --dump-ast prints `inferred` params
and `dead=[…]`. Migrate leftover italic-assign unit fixtures to bold/return.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reject `` `n+1` `` as Decl, and when skipping non-decl `` `…` `` advance past the closing tick so inner `*` cannot open italic (fixes `` `OPENAI_*` `` in ext/ai/llm).
Co-authored-by: Cursor <cursoragent@cursor.com>
Treat `` **x = 1 `` as Code and error with a clear unclosed-`**` diagnostic instead of silently skipping it as a comment.
Co-authored-by: Cursor <cursoragent@cursor.com>
Track CallExpr.bracket_marked from `[callee]` parse so Structure display keeps `[fn] …` instead of falling back to `> fn …` when there are no pre-modifiers.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stabilize `mod… [callee] args` (modifiers → name=True) alongside link-index
disambiguation; expand in interp/bytecode, show in view, and document lib/view
code-as-docs waves before stdlib rewrite.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add GFM link-shaped index as the primary get surface, keep footnote
index as transitional compatibility, and align the coffee example.
Co-authored-by: Cursor <cursoragent@cursor.com>
Treat --- as Markdown HR everywhere, end side-effect helpers with empty returns,
and accept soft emphasis, float literals, and dynamic footnote keys so LLM-friendly
.mq.md stays runnable. Ship the weekend coffee example plus gold fixtures.
Co-authored-by: Cursor <cursoragent@cursor.com>
Migrate remaining .mq.md (tests/ext/public/examples), stop elevating local assigns to params, inject form_target in Go libweb, and skip live LLM gold without a real key.
Co-authored-by: Cursor <cursoragent@cursor.com>
Make prose-unified Markup the only runtime: bold segments are executable,
italic is return, params can be inferred from body/prose, with no v0.2 dual
mode. Migrate lib and structure/keywords golds; gate on tests/markup-v03.
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse `` `var`[^key] `` in `` *…* `` segments and quoted strings as an
Index part (chained `` [^a][^b] `` folds into one part) in both the
tree-walk interpreter and the bytecode compiler, and render it back in
`view`. Also make bytecode `_type` stamping always overwrite like the
interpreter does, so child constructors yield the most specific type.
Adds gold/unit tests for interp footnote indexing and a bytecode
inherit-explicit-super case.
Co-authored-by: Cursor <cursoragent@cursor.com>
Inside italic/bold code segments every bare word is a variable — including
call arguments and method-call receivers — so text literals must be quoted
and receivers no longer need backticks. A bare dotted callee `a.b` resolves
as a method call when `a` is a local variable, otherwise as a library path
(Python-style unified namespace), in both the tree-walk and bytecode backends.
Migrate ~70 tests plus ext/web, ext/quantum, ext/ai and the example projects
to the new idiom; update SKILL.md and the design docs; fix the web/quantum
example data model (db/index.mq.md). Unit and gold suites pass; only the 3
network-live tests fail offline.
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse $$ pmatrix/[[…]] into executable matrices for quantum.gate matrix=, and make the vars panel open a rich modal without breaking the page script.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Parse `# Child = > Parent` object decls (base must be a simple
name after `>`; dotted bases and `# Foo = 1` are diagnostics).
- Validate in load: unknown base types and cyclic inheritance (A → B → A)
fail with line/col.
- Method resolution walks the base chain (most specific first) on both
tree and bytecode backends; `_type` stays the child name; same-name
child ## overrides the parent.
- Add inherit.rs, wire Program.object_bases, gold fixtures
(inherit-parent-method / inherit-override + cycle/unknown-base/bad-rhs)
and public 09-inherit demo pages. Docs: objects.md, markdown-mapping,
roadmap, skill.
Co-authored-by: Cursor <cursoragent@cursor.com>
- 1-col table stays a List; >=2-col becomes a column-oriented Map
(1 data row -> scalar values, >=2 -> Map of Lists).
- First header @ / 行 / row opts into row-oriented List of Maps
(marker column excluded); missing field cols is a diagnostic.
- Footnote index: `xs`[^1] (1-based list), `m`[^key] (map key), chained.
Errors for [^0], out-of-range, missing key, duplicate headers.
- foreach walks list items or map keys; Map values now display as {k: v}.
- Sync both tree and bytecode backends; new gold + error fixtures, docs
(markdown-mapping, roadmap, skill, public), and public 07/08 pages.
- Fix subtask-spawn fixture return value to child_ok (child-ok parses as
subtraction).
Co-authored-by: Cursor <cursoragent@cursor.com>
Quiet spawn still hides child stdout; workbooks solidify to **returns**, agent-kb lives in the plugin, and multi-step follows OKF file relay rather than print-based answers.
Co-authored-by: Cursor <cursoragent@cursor.com>
Bind imports to library names with bare path calls (and use), forward optional host args through mq wrappers, stabilize writeback replacement newlines, and document the M1/M2 decisions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use + for parameters, ordered-list branches, backtick identifiers, and quoted strings with escapes. Add writeback and subtask host libs, optional parameter defaults, narrative-bold comment fix, and defer view execution until preset stdin is submitted.
Co-authored-by: Cursor <cursoragent@cursor.com>
Bind `lang fences like formulas, run them via local interpreters, polish live-view code cards, and refresh bilingual welcome docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Ship Num/Formula runtime, bilingual math libs, SVG plots with axes/grid, and view UX for collapsible folders plus centered plots.
Co-authored-by: Cursor <cursoragent@cursor.com>
English/Chinese user pages sit side by side; L0 builtins and lib/ text|表 dual APIs land with gold coverage. Capture/view input demos use stdin:/输入: so static export and first page load succeed.
Co-authored-by: Cursor <cursoragent@cursor.com>
End nested functions with ---/***/empty return; blank-line comment paragraphs in lex and view; brand favicon/logo; bump crate to 0.0.3.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move gold samples under tests/, put executable user docs in public/, restyle view, and add catalog plus gh-pages publish workflow.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reorganize examples into structure/keywords/errors, launch marqdo view for AST-backed browsing, and ship an M5 stack VM selectable via --backend.
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse functions, calls, returns, branches, loops, tables, and imports so marqdo run passes the examples gold suite (M2–M4).
Co-authored-by: Cursor <cursoragent@cursor.com>
Add clap-based CLI that loads .mq.md and fails loudly until eval exists; pin deps for Cargo 1.81 and verify with an integration test.
Co-authored-by: Cursor <cursoragent@cursor.com>