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>
1.9 KiB
title: web assemble smoke description: Offline assemble + render markers (no listen). import web:ext/web/web.mq.md import shell:web-fixtures/styles/shell.mq.md import nav:web-fixtures/components/nav.mq.md import side:web-fixtures/components/side.mq.md import foot:web-fixtures/components/foot.mq.md import articles:web-fixtures/db/articles.mq.md import fs:lib/fs.mq.md import json:lib/json.mq.md
main
store = > web.db url="sqlite:web-fixtures/data/smoke.db" fields = > articles.schema
store.init name=articles fields=fieldsrows = >store.select table="articles" limit=1
rows_ = 1-
seed = > articles.seed
store.insert table=articles rows=seed
home =
| 组件 | 样式 |
|---|---|
nav.nav |
shell.topnav |
side.side |
shell.side_panel |
foot.foot |
index =
| 属性 | 值 | 样式 |
|---|---|---|
| title | articles.articles.title |
shell.card_title |
| body | articles.articles.body |
shell.card_body |
page = > web.page title="smoke" intro="
smoke
" page = >page.compose_components components=home
page = > page.compose_main main=index
html = > page.render db=store
html
print text=render-ok
print text=render-fail
nav = > json.get value=page key="nav"
nav
print text=compose-nav-ok
print text=compose-nav-fail
side = > json.get value=page key="sidebar"
side
print text=compose-side-ok
print text=compose-side-fail
css = > json.get value=page key="styles_css"
css
print text=styles-ok
print text=styles-fail
parts = > json.get value=page key="parts"
index_part = > json.get value=parts key="index"
index_part
print text=compose-ok
print text=compose-fail
got = > store.get table="articles" id=1
title = > json.get value=got key="title"
title== "Hello Marqdo"
print text=db-ok
print text=db-fail