Add view, positional args, errors gold, and bytecode backend.

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>
This commit is contained in:
cflmyandCursor committed 2026-08-04 12:30:40 +08:00
1 parent a29bf6e97b
commit ac0a3fbced
48 files changed
+3007 -202

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
---
title: 分支示例
---
# main
*`x` = 0*
+ `x` > 0
> print text=正数
+ `x` < 0
> print text=负数
+ *
> print text=零
+16
View File
@@ -0,0 +1,16 @@
---
title: 集合(表格)示例
---
# main
`篮子` =
| 果 |
|----|
| 苹果 |
| 梨 |
| 桃 |
- [果](篮子)
> print text=`果`
+5
View File
@@ -0,0 +1,5 @@
# Hello World
本程序调用内置函数 `print` 打印问候。注释里的 **粗体** 与 *斜体* 都不执行。
> print text=Hello World!
+14
View File
@@ -0,0 +1,14 @@
---
title: 跨文件导入示例
> utils.mq.md
---
# main
导入 `utils.mq.md` 后:用返回值绑定,再输出;并直接调用问候。
*`y` = > 加一 n=41*
> print text=`y`
> 问候 谁=Marqdo
+14
View File
@@ -0,0 +1,14 @@
---
title: 工具函数
description: 供 frontmatter > 导入;返回用粗体;副作用用输出函数
---
# 加一
- n
**`n` + 1**
# 问候
- 谁
> print text=你好,`谁`!
+25
View File
@@ -0,0 +1,25 @@
---
title: 循环示例
---
# main
倒数:
*`n` = 3*
- `n` > 0
> print text=`n`
*`n` = `n` - 1*
遍历篮子:
`篮子` =
| 果 |
|----|
| 苹果 |
| 梨 |
- [果](篮子)
> print text=今天吃`果`
+15
View File
@@ -0,0 +1,15 @@
---
title: Hello World
description: Recommended entry — nested fn; print builtin; bold return
---
# main
打印一句问候。`print` 是函数,不是语法架构;粗体只用于返回值。
> 问候 谁=World
## 问候
- 谁
> print text=Hello `谁`!
+19
View File
@@ -0,0 +1,19 @@
---
title: 位置实参
description: `> fn value` binds by parameter order; named form still works
---
# main
位置实参:
> 问候 Marqdo
具名实参(保留):
> 问候 谁=World
## 问候
- 谁
> print text=Hello `谁`!