joule-ui takes in OpenUI Lang 1.0 the way it takes in A2UI: a model writes a surface as a program, one widget a line, and joule-ui-lang builds a widget tree against the host's registry as the program streams. After every chunk a snapshot holds the tree as far as it can be built, each widget checked by joule-ui's own validate, and every error with its source line and reason code. State, queries, operators, conditionals, built-in functions and sequences of actions are parsed and refused not-declarative. A canonical writer turns a tree back into the language; it parses back to the same tree. - joule-ui-core: WidgetSchema::positional, the order a positional call passes props in (SPEC §3); absent from the wire form when undeclared. - joule-ui-interaction: begin_interaction and Pending::finish, the lifecycle's three phases in two steps for a host whose handler is asynchronous (SPEC §6); run_interaction is built on them and seals what it sealed before. - conformance/lang/v1: L1 statements, L2 ingest, L3 streaming, L4 the canonical form, L5 refusals, with an independent Python verifier written from §11. - docs/create.md: the design of Create. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1161 lines
25 KiB
JSON
1161 lines
25 KiB
JSON
{
|
|
"cases": [
|
|
{
|
|
"code": "unknown-component",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "unknown-component",
|
|
"component": "Chartt",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Chartt([1], [2])\n",
|
|
"line": 3,
|
|
"name": "unknown-component"
|
|
},
|
|
{
|
|
"code": "unknown-component",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "unknown-component",
|
|
"component": "Graph",
|
|
"line": 3,
|
|
"statement": "root"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "root/0",
|
|
"line": 2,
|
|
"statement": "root"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([\n Text(\"kept\"),\n Graph(1)\n])\n",
|
|
"line": 3,
|
|
"name": "unknown-component-inline"
|
|
},
|
|
{
|
|
"code": "missing-required",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "missing-required",
|
|
"component": "Card",
|
|
"line": 3,
|
|
"prop": "title",
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Card()\n",
|
|
"line": 3,
|
|
"name": "missing-required"
|
|
},
|
|
{
|
|
"code": "missing-required",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "missing-required",
|
|
"component": "Text",
|
|
"line": 3,
|
|
"prop": "text",
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": [
|
|
"words"
|
|
]
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(words)\n",
|
|
"line": 3,
|
|
"name": "missing-required-never-written"
|
|
},
|
|
{
|
|
"code": "null-required",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "null-required",
|
|
"component": "Text",
|
|
"line": 3,
|
|
"prop": "text",
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(null)\n",
|
|
"line": 3,
|
|
"name": "null-required"
|
|
},
|
|
{
|
|
"code": "type-mismatch",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "type-mismatch",
|
|
"component": "Text",
|
|
"line": 3,
|
|
"prop": "text",
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(42)\n",
|
|
"line": 3,
|
|
"name": "type-mismatch-required"
|
|
},
|
|
{
|
|
"code": "type-mismatch",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "type-mismatch",
|
|
"component": "Text",
|
|
"line": 2,
|
|
"prop": "size",
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a])\na = Text(\"kept\", \"big\")\n",
|
|
"line": 2,
|
|
"name": "type-mismatch-optional-left-out"
|
|
},
|
|
{
|
|
"code": "type-mismatch",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "type-mismatch",
|
|
"component": "Card",
|
|
"line": 2,
|
|
"prop": "title",
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a])\na = Card(Text(\"no\"))\n",
|
|
"line": 2,
|
|
"name": "type-mismatch-widget-as-data"
|
|
},
|
|
{
|
|
"code": "type-mismatch",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "type-mismatch",
|
|
"component": "Page",
|
|
"line": 1,
|
|
"prop": "children",
|
|
"statement": "root"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page(a)\na = Text(\"no list\")\n",
|
|
"line": 1,
|
|
"name": "type-mismatch-bare-child"
|
|
},
|
|
{
|
|
"code": "type-mismatch",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "type-mismatch",
|
|
"component": "Page",
|
|
"line": 1,
|
|
"prop": "children",
|
|
"statement": "root"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, \"text\"])\na = Text(\"kept\")\n",
|
|
"line": 1,
|
|
"name": "type-mismatch-data-child"
|
|
},
|
|
{
|
|
"code": "excess-args",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "excess-args",
|
|
"component": "Text",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"size": {
|
|
"type": "number",
|
|
"value": 12.0
|
|
},
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a])\na = Text(\"kept\", 12, \"extra\")\n",
|
|
"line": 2,
|
|
"name": "excess-args"
|
|
},
|
|
{
|
|
"code": "disallowed-child",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "disallowed-child",
|
|
"component": "Text",
|
|
"line": 4,
|
|
"statement": "x"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "tabs",
|
|
"line": 2,
|
|
"statement": "tabs"
|
|
},
|
|
{
|
|
"key": "t1",
|
|
"line": 3,
|
|
"statement": "t1"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"name": "Tab",
|
|
"props": {
|
|
"title": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Tabs",
|
|
"props": {}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([tabs])\ntabs = Tabs([t1, x])\nt1 = Tab(\"kept\")\nx = Text(\"not a tab\")\n",
|
|
"line": 4,
|
|
"name": "disallowed-child"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "$count"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a])\na = Text(\"kept\")\n$count = 0\n",
|
|
"line": 3,
|
|
"name": "state-statement"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text($name)\n",
|
|
"line": 3,
|
|
"name": "state-in-a-prop"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "rows"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a])\na = Text(\"kept\")\nrows = Query(\"list\", {}, {rows: []})\n",
|
|
"line": 3,
|
|
"name": "query-statement"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(\"a\" + \"b\")\n",
|
|
"line": 3,
|
|
"name": "operator"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(x\n ? \"y\"\n : \"z\")\n",
|
|
"line": 3,
|
|
"name": "conditional"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(data.title)\n",
|
|
"line": 3,
|
|
"name": "member-access"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
},
|
|
{
|
|
"key": "b",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "n"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(\"n\", @Count([1, 2]))\n",
|
|
"line": 3,
|
|
"name": "builtin-function"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
},
|
|
{
|
|
"key": "b",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Button",
|
|
"props": {
|
|
"label": {
|
|
"type": "text",
|
|
"value": "x"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Button(\"x\", @Set($s, 1))\n",
|
|
"line": 3,
|
|
"name": "state-action"
|
|
},
|
|
{
|
|
"code": "not-declarative",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "not-declarative",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
},
|
|
{
|
|
"key": "b",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Button",
|
|
"props": {
|
|
"label": {
|
|
"type": "text",
|
|
"value": "x"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Button(\"x\", Action([@A(), @B()]))\n",
|
|
"line": 3,
|
|
"name": "action-sequence"
|
|
},
|
|
{
|
|
"code": "inline-reserved",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "inline-reserved",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
},
|
|
{
|
|
"key": "b",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "x"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a, b])\na = Text(\"kept\")\nb = Text(\"x\", Query(\"t\", {}, 1))\n",
|
|
"line": 3,
|
|
"name": "inline-reserved"
|
|
},
|
|
{
|
|
"code": "syntax",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "syntax",
|
|
"line": 3,
|
|
"statement": "b"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [
|
|
{
|
|
"key": "root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
},
|
|
{
|
|
"key": "a",
|
|
"line": 2,
|
|
"statement": "a"
|
|
}
|
|
],
|
|
"orphans": [],
|
|
"tree": {
|
|
"children": [
|
|
{
|
|
"name": "Text",
|
|
"props": {
|
|
"text": {
|
|
"type": "text",
|
|
"value": "kept"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"name": "Page",
|
|
"props": {}
|
|
},
|
|
"unresolved": []
|
|
},
|
|
"input": "root = Page([a])\na = Text(\"kept\")\nb = Text(\"x\" \"y\" +)\n",
|
|
"line": 3,
|
|
"name": "syntax"
|
|
},
|
|
{
|
|
"code": "no-root",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "no-root",
|
|
"line": 0,
|
|
"statement": ""
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [],
|
|
"orphans": [],
|
|
"tree": null,
|
|
"unresolved": []
|
|
},
|
|
"input": "a = Text(\"nothing calls the root\")\n",
|
|
"line": 0,
|
|
"name": "no-root"
|
|
},
|
|
{
|
|
"code": "no-root",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "no-root",
|
|
"line": 1,
|
|
"statement": "root"
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [],
|
|
"orphans": [],
|
|
"tree": null,
|
|
"unresolved": []
|
|
},
|
|
"input": "root = 42\n",
|
|
"line": 1,
|
|
"name": "root-not-a-widget"
|
|
},
|
|
{
|
|
"code": "parse-failed",
|
|
"expected": {
|
|
"errors": [
|
|
{
|
|
"code": "parse-failed",
|
|
"line": 0,
|
|
"statement": ""
|
|
}
|
|
],
|
|
"incomplete": false,
|
|
"nodes": [],
|
|
"orphans": [],
|
|
"tree": null,
|
|
"unresolved": []
|
|
},
|
|
"input": "just some prose a model wrote\n",
|
|
"line": 0,
|
|
"name": "parse-failed"
|
|
}
|
|
],
|
|
"class": "L5"
|
|
}
|