ensure we proxy when assigning to state

proxied-state-each-blocks
Dominic Gannaway 2 years ago
parent cb731aa876
commit 4288843576

@ -219,7 +219,8 @@ export function analyze_module(ast, options) {
module: { ast, scope, scopes }, module: { ast, scope, scopes },
name: options.filename || 'module', name: options.filename || 'module',
warnings, warnings,
accessors: false accessors: false,
runes: true
}; };
} }

@ -152,7 +152,11 @@ export function serialize_set_binding(node, context, fallback) {
if (left.object.type === 'ThisExpression' && left.property.type === 'PrivateIdentifier') { if (left.object.type === 'ThisExpression' && left.property.type === 'PrivateIdentifier') {
if (context.state.private_state.has(left.property.name) && !state.in_constructor) { if (context.state.private_state.has(left.property.name) && !state.in_constructor) {
const value = get_assignment_value(node, context); const value = get_assignment_value(node, context);
return b.call('$.set', left, value); return b.call(
'$.set',
left,
context.state.analysis.runes && should_proxy(value) ? b.call('$.proxy', value) : value
);
} }
} }
// @ts-expect-error // @ts-expect-error
@ -202,7 +206,11 @@ export function serialize_set_binding(node, context, fallback) {
if (is_store) { if (is_store) {
return b.call('$.store_set', serialize_get_binding(b.id(left_name), state), value); return b.call('$.store_set', serialize_get_binding(b.id(left_name), state), value);
} else { } else {
return b.call('$.set', b.id(left_name), value); return b.call(
'$.set',
b.id(left_name),
context.state.analysis.runes && should_proxy(value) ? b.call('$.proxy', value) : value
);
} }
} else { } else {
if (is_store) { if (is_store) {
@ -385,7 +393,8 @@ export function should_proxy(node) {
!node || !node ||
node.type === 'Literal' || node.type === 'Literal' ||
node.type === 'ArrowFunctionExpression' || node.type === 'ArrowFunctionExpression' ||
node.type === 'FunctionExpression' node.type === 'FunctionExpression' ||
(node.type === 'Identifier' && node.name === 'undefined')
) { ) {
return false; return false;
} }

@ -100,7 +100,8 @@ export class Scope {
is_called: false, is_called: false,
prop_alias: null, prop_alias: null,
expression: null, expression: null,
mutation: null mutation: null,
reassigned: false
}; };
this.declarations.set(node.name, binding); this.declarations.set(node.name, binding);
this.root.conflicts.add(node.name); this.root.conflicts.add(node.name);

@ -46,6 +46,7 @@ export interface Analysis {
module: Js; module: Js;
name: string; // TODO should this be filename? it's used in `compileModule` as well as `compile` name: string; // TODO should this be filename? it's used in `compileModule` as well as `compile`
warnings: RawWarning[]; warnings: RawWarning[];
runes: boolean;
// TODO figure out if we can move this to ComponentAnalysis // TODO figure out if we can move this to ComponentAnalysis
accessors: boolean; accessors: boolean;

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 35, "end": 35,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 35, "end": 35,
"type": "Element",
"name": "input", "name": "input",
"attributes": [ "attributes": [
{ {

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 40, "end": 40,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 40, "end": 40,
"type": "Element",
"name": "input", "name": "input",
"attributes": [ "attributes": [
{ {

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 29, "end": 29,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 29, "end": 29,
"type": "Element",
"name": "input", "name": "input",
"attributes": [ "attributes": [
{ {

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 37, "end": 37,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 37, "end": 37,
"type": "Element",
"name": "input", "name": "input",
"attributes": [ "attributes": [
{ {

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 21, "end": 21,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 21, "end": 21,
"type": "Element",
"name": "input", "name": "input",
"attributes": [ "attributes": [
{ {

@ -1,34 +1,18 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 70, "end": 70,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "EachBlock",
"start": 0, "start": 0,
"end": 70, "end": 70,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"name": "things"
},
"children": [ "children": [
{ {
"type": "Element",
"start": 33, "start": 33,
"end": 62, "end": 62,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -42,9 +26,9 @@
], ],
"children": [ "children": [
{ {
"type": "Text",
"start": 51, "start": 51,
"end": 56, "end": 56,
"type": "Text",
"raw": "flips", "raw": "flips",
"data": "flips" "data": "flips"
} }
@ -57,6 +41,22 @@
"start": 17, "start": 17,
"end": 22 "end": 22
}, },
"expression": {
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"name": "things"
},
"key": { "key": {
"type": "Identifier", "type": "Identifier",
"start": 24, "start": 24,

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 29, "end": 29,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 29, "end": 29,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 41, "end": 41,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 41, "end": 41,
"type": "Element",
"name": "a", "name": "a",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 3, "start": 3,
"end": 30, "end": 30,
"type": "Attribute",
"name": "href", "name": "href",
"value": [ "value": [
{ {
@ -28,9 +28,9 @@
], ],
"children": [ "children": [
{ {
"type": "Text",
"start": 31, "start": 31,
"end": 37, "end": 37,
"type": "Text",
"raw": "Google", "raw": "Google",
"data": "Google" "data": "Google"
} }

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 18, "end": 18,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 18, "end": 18,
"type": "Element",
"name": "input", "name": "input",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 7, "start": 7,
"end": 15, "end": 15,
"type": "Attribute",
"name": "foo", "name": "foo",
"value": [ "value": [
{ {
@ -24,9 +24,9 @@
"data": "a" "data": "a"
}, },
{ {
"type": "MustacheTag",
"start": 12, "start": 12,
"end": 15, "end": 15,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Literal", "type": "Literal",
"start": 13, "start": 13,

@ -1,25 +1,25 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 41, "end": 41,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 41, "end": 41,
"type": "Element",
"name": "textarea", "name": "textarea",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 10, "start": 10,
"end": 29, "end": 29,
"type": "Attribute",
"name": "readonly", "name": "readonly",
"value": [ "value": [
{ {
"type": "MustacheTag",
"start": 19, "start": 19,
"end": 29, "end": 29,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 20, "start": 20,

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 42, "end": 42,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 42, "end": 42,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 28, "end": 28,
"type": "Attribute",
"name": "style", "name": "style",
"value": [ "value": [
{ {
@ -24,9 +24,9 @@
"data": "color: " "data": "color: "
}, },
{ {
"type": "MustacheTag",
"start": 19, "start": 19,
"end": 26, "end": 26,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 20, "start": 20,
@ -56,9 +56,9 @@
], ],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 29, "start": 29,
"end": 36, "end": 36,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 30, "start": 30,

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 38, "end": 38,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 38, "end": 38,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 9, "end": 9,
"type": "Attribute",
"name": "a", "name": "a",
"value": [ "value": [
{ {
@ -26,15 +26,15 @@
] ]
}, },
{ {
"type": "Attribute",
"start": 10, "start": 10,
"end": 16, "end": 16,
"type": "Attribute",
"name": "b", "name": "b",
"value": [ "value": [
{ {
"type": "MustacheTag",
"start": 12, "start": 12,
"end": 16, "end": 16,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Literal", "type": "Literal",
"start": 13, "start": 13,
@ -56,9 +56,9 @@
] ]
}, },
{ {
"type": "Attribute",
"start": 17, "start": 17,
"end": 21, "end": 21,
"type": "Attribute",
"name": "c", "name": "c",
"value": [ "value": [
{ {
@ -71,15 +71,15 @@
] ]
}, },
{ {
"type": "Attribute",
"start": 22, "start": 22,
"end": 30, "end": 30,
"type": "Attribute",
"name": "d", "name": "d",
"value": [ "value": [
{ {
"type": "MustacheTag",
"start": 25, "start": 25,
"end": 29, "end": 29,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Literal", "type": "Literal",
"start": 26, "start": 26,

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 83, "end": 83,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 83, "end": 83,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 76, "end": 76,
"type": "Attribute",
"name": "data-foo", "name": "data-foo",
"value": [ "value": [
{ {

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 28, "end": 28,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 28, "end": 28,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 11, "end": 11,
"type": "Attribute",
"name": "id", "name": "id",
"value": [ "value": [
{ {
@ -26,9 +26,9 @@
] ]
}, },
{ {
"type": "Attribute",
"start": 12, "start": 12,
"end": 21, "end": 21,
"type": "Attribute",
"name": "class", "name": "class",
"value": [ "value": [
{ {

@ -1,25 +1,25 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 11, "end": 11,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 11, "end": 11,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 9, "end": 9,
"type": "Attribute",
"name": "id", "name": "id",
"value": [ "value": [
{ {
"type": "AttributeShorthand",
"start": 6, "start": 6,
"end": 8, "end": 8,
"type": "AttributeShorthand",
"expression": { "expression": {
"start": 6, "start": 6,
"end": 8, "end": 8,

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 30, "end": 30,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 30, "end": 30,
"type": "Element",
"name": "textarea", "name": "textarea",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 10, "start": 10,
"end": 18, "end": 18,
"type": "Attribute",
"name": "readonly", "name": "readonly",
"value": true "value": true
} }

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 23, "end": 23,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 23, "end": 23,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 16, "end": 16,
"type": "Attribute",
"name": "class", "name": "class",
"value": [ "value": [
{ {

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 43, "end": 43,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 43, "end": 43,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -15,12 +15,14 @@
"end": 36, "end": 36,
"type": "StyleDirective", "type": "StyleDirective",
"name": "color", "name": "color",
"modifiers": ["important"], "modifiers": [
"important"
],
"value": [ "value": [
{ {
"type": "MustacheTag",
"start": 27, "start": 27,
"end": 36, "end": 36,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 28, "start": 28,

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 23, "end": 23,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 23, "end": 23,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 252, "end": 252,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 29, "end": 29,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -30,24 +30,24 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 29, "start": 29,
"end": 30, "end": 30,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 30, "start": 30,
"end": 59, "end": 59,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"start": 35, "start": 35,
"end": 52, "end": 52,
"type": "StyleDirective", "type": "StyleDirective",
"modifiers": [],
"name": "color", "name": "color",
"modifiers": [],
"value": [ "value": [
{ {
"start": 48, "start": 48,
@ -62,16 +62,16 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 59, "start": 59,
"end": 60, "end": 60,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 60, "start": 60,
"end": 87, "end": 87,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -94,16 +94,16 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 87, "start": 87,
"end": 88, "end": 88,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 88, "start": 88,
"end": 127, "end": 127,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -121,9 +121,9 @@
"data": "red" "data": "red"
}, },
{ {
"type": "MustacheTag",
"start": 109, "start": 109,
"end": 119, "end": 119,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 110, "start": 110,
@ -147,16 +147,16 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 127, "start": 127,
"end": 128, "end": 128,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 128, "start": 128,
"end": 167, "end": 167,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -174,9 +174,9 @@
"data": "red" "data": "red"
}, },
{ {
"type": "MustacheTag",
"start": 149, "start": 149,
"end": 159, "end": 159,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 150, "start": 150,
@ -200,16 +200,16 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 167, "start": 167,
"end": 168, "end": 168,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 168, "start": 168,
"end": 205, "end": 205,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -227,9 +227,9 @@
"data": "red" "data": "red"
}, },
{ {
"type": "MustacheTag",
"start": 188, "start": 188,
"end": 198, "end": 198,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 189, "start": 189,
@ -253,16 +253,16 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 205, "start": 205,
"end": 206, "end": 206,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 206, "start": 206,
"end": 252, "end": 252,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -273,9 +273,9 @@
"modifiers": [], "modifiers": [],
"value": [ "value": [
{ {
"type": "MustacheTag",
"start": 223, "start": 223,
"end": 245, "end": 245,
"type": "MustacheTag",
"expression": { "expression": {
"type": "TemplateLiteral", "type": "TemplateLiteral",
"start": 224, "start": 224,

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 33, "end": 33,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 33, "end": 33,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -18,9 +18,9 @@
"modifiers": [], "modifiers": [],
"value": [ "value": [
{ {
"type": "MustacheTag",
"start": 17, "start": 17,
"end": 26, "end": 26,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 18, "start": 18,

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 34, "end": 34,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 34, "end": 34,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 24, "end": 24,
"type": "Attribute",
"name": "style", "name": "style",
"value": [ "value": [
{ {
@ -28,9 +28,9 @@
], ],
"children": [ "children": [
{ {
"type": "Text",
"start": 25, "start": 25,
"end": 28, "end": 28,
"type": "Text",
"raw": "red", "raw": "red",
"data": "red" "data": "red"
} }

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 21, "end": 21,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 21, "end": 21,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 5, "start": 5,
"end": 14, "end": 14,
"type": "Attribute",
"name": "class", "name": "class",
"value": [ "value": [
{ {

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 38, "end": 38,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 38, "end": 38,
"type": "Element",
"name": "button", "name": "button",
"attributes": [ "attributes": [
{ {
@ -36,9 +36,9 @@
], ],
"children": [ "children": [
{ {
"type": "Text",
"start": 24, "start": 24,
"end": 29, "end": 29,
"type": "Text",
"raw": "Click", "raw": "Click",
"data": "Click" "data": "Click"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 99, "end": 99,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "AwaitBlock",
"start": 0, "start": 0,
"end": 99, "end": 99,
"type": "AwaitBlock",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 8, "start": 8,
@ -32,37 +32,37 @@
"end": 55 "end": 55
}, },
"pending": { "pending": {
"type": "PendingBlock",
"start": 19, "start": 19,
"end": 39, "end": 39,
"type": "PendingBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 19, "start": 19,
"end": 21, "end": 21,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 21, "start": 21,
"end": 38, "end": 38,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 24, "start": 24,
"end": 34, "end": 34,
"type": "Text",
"raw": "loading...", "raw": "loading...",
"data": "loading..." "data": "loading..."
} }
] ]
}, },
{ {
"type": "Text",
"start": 38, "start": 38,
"end": 39, "end": 39,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }
@ -70,42 +70,42 @@
"skip": false "skip": false
}, },
"then": { "then": {
"type": "ThenBlock",
"start": null, "start": null,
"end": null, "end": null,
"type": "ThenBlock",
"children": [], "children": [],
"skip": true "skip": true
}, },
"catch": { "catch": {
"type": "CatchBlock",
"start": 39, "start": 39,
"end": 91, "end": 91,
"type": "CatchBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 56, "start": 56,
"end": 58, "end": 58,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 58, "start": 58,
"end": 90, "end": 90,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 61, "start": 61,
"end": 68, "end": 68,
"type": "Text",
"raw": "oh no! ", "raw": "oh no! ",
"data": "oh no! " "data": "oh no! "
}, },
{ {
"type": "MustacheTag",
"start": 68, "start": 68,
"end": 86, "end": 86,
"type": "MustacheTag",
"expression": { "expression": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 69, "start": 69,
@ -159,9 +159,9 @@
] ]
}, },
{ {
"type": "Text",
"start": 90, "start": 90,
"end": 91, "end": 91,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 148, "end": 148,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "AwaitBlock",
"start": 0, "start": 0,
"end": 148, "end": 148,
"type": "AwaitBlock",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 8, "start": 8,
@ -37,37 +37,37 @@
"end": 104 "end": 104
}, },
"pending": { "pending": {
"type": "PendingBlock",
"start": 19, "start": 19,
"end": 39, "end": 39,
"type": "PendingBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 19, "start": 19,
"end": 21, "end": 21,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 21, "start": 21,
"end": 38, "end": 38,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 24, "start": 24,
"end": 34, "end": 34,
"type": "Text",
"raw": "loading...", "raw": "loading...",
"data": "loading..." "data": "loading..."
} }
] ]
}, },
{ {
"type": "Text",
"start": 38, "start": 38,
"end": 39, "end": 39,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }
@ -75,35 +75,35 @@
"skip": false "skip": false
}, },
"then": { "then": {
"type": "ThenBlock",
"start": 39, "start": 39,
"end": 88, "end": 88,
"type": "ThenBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 55, "start": 55,
"end": 57, "end": 57,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 57, "start": 57,
"end": 87, "end": 87,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 60, "start": 60,
"end": 73, "end": 73,
"type": "Text",
"raw": "the value is ", "raw": "the value is ",
"data": "the value is " "data": "the value is "
}, },
{ {
"type": "MustacheTag",
"start": 73, "start": 73,
"end": 83, "end": 83,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 74, "start": 74,
@ -124,9 +124,9 @@
] ]
}, },
{ {
"type": "Text",
"start": 87, "start": 87,
"end": 88, "end": 88,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }
@ -134,35 +134,35 @@
"skip": false "skip": false
}, },
"catch": { "catch": {
"type": "CatchBlock",
"start": 88, "start": 88,
"end": 140, "end": 140,
"type": "CatchBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 105, "start": 105,
"end": 107, "end": 107,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 107, "start": 107,
"end": 139, "end": 139,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 110, "start": 110,
"end": 117, "end": 117,
"type": "Text",
"raw": "oh no! ", "raw": "oh no! ",
"data": "oh no! " "data": "oh no! "
}, },
{ {
"type": "MustacheTag",
"start": 117, "start": 117,
"end": 135, "end": 135,
"type": "MustacheTag",
"expression": { "expression": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 118, "start": 118,
@ -216,9 +216,9 @@
] ]
}, },
{ {
"type": "Text",
"start": 139, "start": 139,
"end": 140, "end": 140,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }

@ -1,20 +1,20 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 30, "start": 30,
"end": 48, "end": 48,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 28, "start": 28,
"end": 30, "end": 30,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "InlineComponent",
"start": 30, "start": 30,
"end": 48, "end": 48,
"type": "InlineComponent",
"name": "Widget", "name": "Widget",
"attributes": [ "attributes": [
{ {

@ -1,20 +1,20 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 31, "start": 31,
"end": 56, "end": 56,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 29, "start": 29,
"end": 31, "end": 31,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "Element",
"start": 31, "start": 31,
"end": 56, "end": 56,
"type": "Element",
"name": "input", "name": "input",
"attributes": [ "attributes": [
{ {

@ -1,15 +1,18 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 30, "end": 30,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Comment",
"start": 0, "start": 0,
"end": 30, "end": 30,
"type": "Comment",
"data": " svelte-ignore foo bar ", "data": " svelte-ignore foo bar ",
"ignores": ["foo", "bar"] "ignores": [
"foo",
"bar"
]
} }
] ]
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 18, "end": 18,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Comment",
"start": 0, "start": 0,
"end": 18, "end": 18,
"type": "Comment",
"data": " a comment ", "data": " a comment ",
"ignores": [] "ignores": []
} }

@ -1,16 +1,14 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 62, "end": 62,
"type": "Fragment",
"children": [ "children": [
{ {
"start": 0,
"end": 62,
"type": "InlineComponent", "type": "InlineComponent",
"name": "svelte:component", "name": "svelte:component",
"attributes": [], "start": 0,
"children": [], "end": 62,
"expression": { "expression": {
"type": "ConditionalExpression", "type": "ConditionalExpression",
"start": 25, "start": 25,
@ -73,7 +71,9 @@
}, },
"name": "Bar" "name": "Bar"
} }
} },
"attributes": [],
"children": []
} }
] ]
} }

@ -1,20 +1,20 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 24, "end": 24,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 24, "end": 24,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 3, "start": 3,
"end": 20, "end": 20,
"type": "Text",
"raw": "Hello & World", "raw": "Hello & World",
"data": "Hello & World" "data": "Hello & World"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 17, "end": 17,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 0, "start": 0,
"end": 17, "end": 17,
"type": "Text",
"raw": "Hello & World", "raw": "Hello & World",
"data": "Hello & World" "data": "Hello & World"
} }

@ -1,29 +1,29 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 14, "end": 14,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 14, "end": 14,
"type": "Element",
"name": "div", "name": "div",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 5, "start": 5,
"end": 8, "end": 8,
"type": "Text",
"raw": "foo", "raw": "foo",
"data": "foo" "data": "foo"
} }
] ]
}, },
{ {
"type": "Text",
"start": 14, "start": 14,
"end": 16, "end": 16,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
} }
@ -39,9 +39,13 @@
"type": "Rule", "type": "Rule",
"prelude": { "prelude": {
"type": "SelectorList", "type": "SelectorList",
"start": 25,
"end": 28,
"children": [ "children": [
{ {
"type": "Selector", "type": "Selector",
"start": 25,
"end": 28,
"children": [ "children": [
{ {
"type": "TypeSelector", "type": "TypeSelector",
@ -49,27 +53,23 @@
"start": 25, "start": 25,
"end": 28 "end": 28
} }
], ]
"start": 25,
"end": 28
} }
], ]
"start": 25,
"end": 28
}, },
"block": { "block": {
"type": "Block", "type": "Block",
"start": 29,
"end": 47,
"children": [ "children": [
{ {
"type": "Declaration", "type": "Declaration",
"property": "color",
"value": "red",
"start": 33, "start": 33,
"end": 43 "end": 43,
"property": "color",
"value": "red"
} }
], ]
"start": 29,
"end": 47
}, },
"start": 25, "start": 25,
"end": 47 "end": 47

@ -1,30 +1,31 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 101, "end": 101,
"type": "Fragment",
"children": [ "children": [
{ {
"start": 0,
"end": 44,
"type": "Element", "type": "Element",
"name": "svelte:element", "name": "svelte:element",
"start": 0,
"end": 44,
"tag": "div",
"attributes": [], "attributes": [],
"children": [], "children": []
"tag": "div"
}, },
{ {
"type": "Text", "type": "Text",
"start": 44, "start": 44,
"end": 45, "end": 45,
"data": "\n", "raw": "\n",
"raw": "\n" "data": "\n"
}, },
{ {
"start": 45,
"end": 101,
"type": "Element", "type": "Element",
"name": "svelte:element", "name": "svelte:element",
"start": 45,
"end": 101,
"tag": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute", "type": "Attribute",
@ -33,17 +34,16 @@
"name": "class", "name": "class",
"value": [ "value": [
{ {
"type": "Text",
"start": 79, "start": 79,
"end": 82, "end": 82,
"data": "foo", "type": "Text",
"raw": "foo" "raw": "foo",
"data": "foo"
} }
] ]
} }
], ],
"children": [], "children": []
"tag": "div"
} }
] ]
} }

@ -1,17 +1,16 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 101, "end": 101,
"type": "Fragment",
"children": [ "children": [
{ {
"start": 0,
"end": 44,
"type": "Element", "type": "Element",
"name": "svelte:element", "name": "svelte:element",
"attributes": [], "start": 0,
"children": [], "end": 44,
"tag": { "tag": {
"type": "Identifier",
"start": 22, "start": 22,
"end": 25, "end": 25,
"loc": { "loc": {
@ -24,41 +23,25 @@
"column": 25 "column": 25
} }
}, },
"name": "tag", "name": "tag"
"type": "Identifier" },
} "attributes": [],
"children": []
}, },
{ {
"type": "Text", "type": "Text",
"start": 44, "start": 44,
"end": 45, "end": 45,
"data": "\n", "raw": "\n",
"raw": "\n" "data": "\n"
}, },
{ {
"start": 45,
"end": 101,
"type": "Element", "type": "Element",
"name": "svelte:element", "name": "svelte:element",
"children": [], "start": 45,
"attributes": [ "end": 101,
{
"type": "Attribute",
"start": 72,
"end": 83,
"name": "class",
"value": [
{
"type": "Text",
"start": 79,
"end": 82,
"data": "foo",
"raw": "foo"
}
]
}
],
"tag": { "tag": {
"type": "Identifier",
"start": 67, "start": 67,
"end": 70, "end": 70,
"loc": { "loc": {
@ -71,9 +54,26 @@
"column": 25 "column": 25
} }
}, },
"name": "tag", "name": "tag"
"type": "Identifier" },
"attributes": [
{
"type": "Attribute",
"start": 72,
"end": 83,
"name": "class",
"value": [
{
"start": 79,
"end": 82,
"type": "Text",
"raw": "foo",
"data": "foo"
} }
]
}
],
"children": []
} }
] ]
} }

@ -1,8 +1,8 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": null, "start": null,
"end": null, "end": null,
"type": "Fragment",
"children": [] "children": []
}, },
"instance": { "instance": {

@ -1,48 +1,32 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 41, "start": 41,
"end": 112, "end": 112,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 39, "start": 39,
"end": 41, "end": 41,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "EachBlock",
"start": 41, "start": 41,
"end": 112, "end": 112,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 14
}
},
"name": "animals"
},
"children": [ "children": [
{ {
"type": "Element",
"start": 83, "start": 83,
"end": 104, "end": 104,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 86, "start": 86,
"end": 91, "end": 91,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 87, "start": 87,
@ -61,16 +45,16 @@
} }
}, },
{ {
"type": "Text",
"start": 91, "start": 91,
"end": 93, "end": 93,
"type": "Text",
"raw": ": ", "raw": ": ",
"data": ": " "data": ": "
}, },
{ {
"type": "MustacheTag",
"start": 93, "start": 93,
"end": 100, "end": 100,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 94, "start": 94,
@ -170,6 +154,22 @@
} }
} }
] ]
},
"expression": {
"type": "Identifier",
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 14
}
},
"name": "animals"
} }
} }
] ]

@ -1,41 +1,25 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 77, "end": 77,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "EachBlock",
"start": 0, "start": 0,
"end": 77, "end": 77,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"children": [ "children": [
{ {
"type": "Element",
"start": 27, "start": 27,
"end": 42, "end": 42,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 30, "start": 30,
"end": 38, "end": 38,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 31, "start": 31,
@ -62,22 +46,38 @@
"start": 18, "start": 18,
"end": 24 "end": 24
}, },
"expression": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"else": { "else": {
"type": "ElseBlock",
"start": 50, "start": 50,
"end": 70, "end": 70,
"type": "ElseBlock",
"children": [ "children": [
{ {
"type": "Element",
"start": 52, "start": 52,
"end": 69, "end": 69,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 55, "start": 55,
"end": 65, "end": 65,
"type": "Text",
"raw": "no animals", "raw": "no animals",
"data": "no animals" "data": "no animals"
} }

@ -1,41 +1,25 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 58, "end": 58,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "EachBlock",
"start": 0, "start": 0,
"end": 58, "end": 58,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"children": [ "children": [
{ {
"type": "Element",
"start": 30, "start": 30,
"end": 50, "end": 50,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 33, "start": 33,
"end": 36, "end": 36,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 34, "start": 34,
@ -54,16 +38,16 @@
} }
}, },
{ {
"type": "Text",
"start": 36, "start": 36,
"end": 38, "end": 38,
"type": "Text",
"raw": ": ", "raw": ": ",
"data": ": " "data": ": "
}, },
{ {
"type": "MustacheTag",
"start": 38, "start": 38,
"end": 46, "end": 46,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 39, "start": 39,
@ -90,6 +74,22 @@
"start": 18, "start": 18,
"end": 24 "end": 24
}, },
"expression": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"index": "i" "index": "i"
} }
] ]

@ -1,41 +1,25 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 54, "end": 54,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "EachBlock",
"start": 0, "start": 0,
"end": 54, "end": 54,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"name": "todos"
},
"children": [ "children": [
{ {
"type": "Element",
"start": 33, "start": 33,
"end": 46, "end": 46,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 36, "start": 36,
"end": 42, "end": 42,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 37, "start": 37,
@ -62,6 +46,22 @@
"start": 16, "start": 16,
"end": 20 "end": 20
}, },
"expression": {
"type": "Identifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"name": "todos"
},
"key": { "key": {
"type": "MemberExpression", "type": "MemberExpression",
"start": 22, "start": 22,

@ -1,41 +1,25 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 50, "end": 50,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "EachBlock",
"start": 0, "start": 0,
"end": 50, "end": 50,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
},
"children": [ "children": [
{ {
"type": "Element",
"start": 27, "start": 27,
"end": 42, "end": 42,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 30, "start": 30,
"end": 38, "end": 38,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 31, "start": 31,
@ -61,6 +45,22 @@
"name": "animal", "name": "animal",
"start": 18, "start": 18,
"end": 24 "end": 24
},
"expression": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"name": "animals"
} }
} }
] ]

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 43, "end": 43,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 21, "end": 21,
"type": "Element",
"name": "span", "name": "span",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 6, "start": 6,
"end": 13, "end": 13,
"type": "Attribute",
"name": "attr", "name": "attr",
"value": [ "value": [
{ {
@ -29,22 +29,22 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 21, "start": 21,
"end": 22, "end": 22,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 22, "start": 22,
"end": 43, "end": 43,
"type": "Element",
"name": "span", "name": "span",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 28, "start": 28,
"end": 35, "end": 35,
"type": "Attribute",
"name": "attr", "name": "attr",
"value": [ "value": [
{ {

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 49, "end": 49,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 24, "end": 24,
"type": "Element",
"name": "span", "name": "span",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 6, "start": 6,
"end": 16, "end": 16,
"type": "Attribute",
"name": "attr", "name": "attr",
"value": [ "value": [
{ {
@ -29,22 +29,22 @@
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 24, "start": 24,
"end": 25, "end": 25,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
}, },
{ {
"type": "Element",
"start": 25, "start": 25,
"end": 49, "end": 49,
"type": "Element",
"name": "span", "name": "span",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 31, "start": 31,
"end": 41, "end": 41,
"type": "Attribute",
"name": "attr", "name": "attr",
"value": [ "value": [
{ {

@ -1,27 +1,27 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 22, "end": 22,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 22, "end": 22,
"type": "Element",
"name": "h1", "name": "h1",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 4, "start": 4,
"end": 10, "end": 10,
"type": "Text",
"raw": "hello ", "raw": "hello ",
"data": "hello " "data": "hello "
}, },
{ {
"type": "MustacheTag",
"start": 10, "start": 10,
"end": 16, "end": 16,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 11, "start": 11,
@ -40,9 +40,9 @@
} }
}, },
{ {
"type": "Text",
"start": 16, "start": 16,
"end": 17, "end": 17,
"type": "Text",
"raw": "!", "raw": "!",
"data": "!" "data": "!"
} }

@ -1,20 +1,20 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 17, "end": 17,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 17, "end": 17,
"type": "Element",
"name": "span", "name": "span",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 6, "start": 6,
"end": 10, "end": 10,
"type": "Text",
"raw": "test", "raw": "test",
"data": "test" "data": "test"
} }

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 15, "end": 15,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 15, "end": 15,
"type": "Element",
"name": "!doctype", "name": "!doctype",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 10, "start": 10,
"end": 14, "end": 14,
"type": "Attribute",
"name": "html", "name": "html",
"value": true "value": true
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 97, "end": 97,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 61, "end": 61,
"type": "Element",
"name": "button", "name": "button",
"attributes": [ "attributes": [
{ {
@ -105,25 +105,25 @@
], ],
"children": [ "children": [
{ {
"type": "Text",
"start": 46, "start": 46,
"end": 52, "end": 52,
"type": "Text",
"raw": "toggle", "raw": "toggle",
"data": "toggle" "data": "toggle"
} }
] ]
}, },
{ {
"type": "Text",
"start": 61, "start": 61,
"end": 63, "end": 63,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "IfBlock",
"start": 63, "start": 63,
"end": 97, "end": 97,
"type": "IfBlock",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 68, "start": 68,
@ -142,16 +142,16 @@
}, },
"children": [ "children": [
{ {
"type": "Element",
"start": 78, "start": 78,
"end": 91, "end": 91,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 81, "start": 81,
"end": 87, "end": 87,
"type": "Text",
"raw": "hello!", "raw": "hello!",
"data": "hello!" "data": "hello!"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 51, "end": 51,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "IfBlock",
"start": 0, "start": 0,
"end": 51, "end": 51,
"type": "IfBlock",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 5, "start": 5,
@ -26,16 +26,16 @@
}, },
"children": [ "children": [
{ {
"type": "Element",
"start": 11, "start": 11,
"end": 21, "end": 21,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 14, "start": 14,
"end": 17, "end": 17,
"type": "Text",
"raw": "foo", "raw": "foo",
"data": "foo" "data": "foo"
} }
@ -43,21 +43,21 @@
} }
], ],
"else": { "else": {
"type": "ElseBlock",
"start": 29, "start": 29,
"end": 46, "end": 46,
"type": "ElseBlock",
"children": [ "children": [
{ {
"type": "Element",
"start": 31, "start": 31,
"end": 45, "end": 45,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 34, "start": 34,
"end": 41, "end": 41,
"type": "Text",
"raw": "not foo", "raw": "not foo",
"data": "not foo" "data": "not foo"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 89, "end": 89,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "IfBlock",
"start": 0, "start": 0,
"end": 89, "end": 89,
"type": "IfBlock",
"expression": { "expression": {
"type": "BinaryExpression", "type": "BinaryExpression",
"start": 5, "start": 5,
@ -59,16 +59,16 @@
}, },
"children": [ "children": [
{ {
"type": "Element",
"start": 14, "start": 14,
"end": 41, "end": 41,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 17, "start": 17,
"end": 37, "end": 37,
"type": "Text",
"raw": "x is greater than 10", "raw": "x is greater than 10",
"data": "x is greater than 10" "data": "x is greater than 10"
} }
@ -76,15 +76,14 @@
} }
], ],
"else": { "else": {
"type": "ElseBlock",
"start": 58, "start": 58,
"end": 84, "end": 84,
"type": "ElseBlock",
"children": [ "children": [
{ {
"type": "IfBlock",
"start": 58, "start": 58,
"end": 89, "end": 89,
"type": "IfBlock",
"elseif": true,
"expression": { "expression": {
"type": "BinaryExpression", "type": "BinaryExpression",
"start": 52, "start": 52,
@ -136,22 +135,23 @@
}, },
"children": [ "children": [
{ {
"type": "Element",
"start": 60, "start": 60,
"end": 83, "end": 83,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 63, "start": 63,
"end": 79, "end": 79,
"type": "Text",
"raw": "x is less than 5", "raw": "x is less than 5",
"data": "x is less than 5" "data": "x is less than 5"
} }
] ]
} }
] ],
"elseif": true
} }
] ]
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 17, "end": 17,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "IfBlock",
"start": 0, "start": 0,
"end": 17, "end": 17,
"type": "IfBlock",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 5, "start": 5,
@ -26,9 +26,9 @@
}, },
"children": [ "children": [
{ {
"type": "Text",
"start": 9, "start": 9,
"end": 12, "end": 12,
"type": "Text",
"raw": "bar", "raw": "bar",
"data": "bar" "data": "bar"
} }

@ -1,66 +1,66 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 31, "end": 31,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 31, "end": 31,
"type": "Element",
"name": "ul", "name": "ul",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 4, "start": 4,
"end": 6, "end": 6,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 6, "start": 6,
"end": 13, "end": 13,
"type": "Element",
"name": "li", "name": "li",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 10, "start": 10,
"end": 13, "end": 13,
"type": "Text",
"raw": "a\n\t", "raw": "a\n\t",
"data": "a\n\t" "data": "a\n\t"
} }
] ]
}, },
{ {
"type": "Element",
"start": 13, "start": 13,
"end": 20, "end": 20,
"type": "Element",
"name": "li", "name": "li",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 17, "start": 17,
"end": 20, "end": 20,
"type": "Text",
"raw": "b\n\t", "raw": "b\n\t",
"data": "b\n\t" "data": "b\n\t"
} }
] ]
}, },
{ {
"type": "Element",
"start": 20, "start": 20,
"end": 26, "end": 26,
"type": "Element",
"name": "li", "name": "li",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 24, "start": 24,
"end": 26, "end": 26,
"type": "Text",
"raw": "c\n", "raw": "c\n",
"data": "c\n" "data": "c\n"
} }

@ -1,20 +1,20 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 19, "end": 19,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 19, "end": 19,
"type": "Element",
"name": "span", "name": "span",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 6, "start": 6,
"end": 12, "end": 12,
"type": "Text",
"raw": " ", "raw": " ",
"data": " " "data": " "
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 148, "end": 148,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "IfBlock",
"start": 0, "start": 0,
"end": 33, "end": 33,
"type": "IfBlock",
"expression": { "expression": {
"type": "Literal", "type": "Literal",
"start": 5, "start": 5,
@ -27,32 +27,32 @@
}, },
"children": [ "children": [
{ {
"type": "Element",
"start": 12, "start": 12,
"end": 19, "end": 19,
"type": "Element",
"name": "input", "name": "input",
"attributes": [], "attributes": [],
"children": [] "children": []
} }
], ],
"else": { "else": {
"type": "ElseBlock",
"start": 27, "start": 27,
"end": 28, "end": 28,
"type": "ElseBlock",
"children": [] "children": []
} }
}, },
{ {
"type": "Text",
"start": 33, "start": 33,
"end": 35, "end": 35,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "IfBlock",
"start": 35, "start": 35,
"end": 65, "end": 65,
"type": "IfBlock",
"expression": { "expression": {
"type": "Literal", "type": "Literal",
"start": 40, "start": 40,
@ -72,32 +72,32 @@
}, },
"children": [ "children": [
{ {
"type": "Element",
"start": 47, "start": 47,
"end": 51, "end": 51,
"type": "Element",
"name": "br", "name": "br",
"attributes": [], "attributes": [],
"children": [] "children": []
} }
], ],
"else": { "else": {
"type": "ElseBlock",
"start": 59, "start": 59,
"end": 60, "end": 60,
"type": "ElseBlock",
"children": [] "children": []
} }
}, },
{ {
"type": "Text",
"start": 65, "start": 65,
"end": 67, "end": 67,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "AwaitBlock",
"start": 67, "start": 67,
"end": 108, "end": 108,
"type": "AwaitBlock",
"expression": { "expression": {
"type": "Literal", "type": "Literal",
"start": 75, "start": 75,
@ -123,29 +123,29 @@
}, },
"error": null, "error": null,
"pending": { "pending": {
"type": "PendingBlock",
"start": 80, "start": 80,
"end": 90, "end": 90,
"type": "PendingBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 80, "start": 80,
"end": 82, "end": 82,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 82, "start": 82,
"end": 89, "end": 89,
"type": "Element",
"name": "input", "name": "input",
"attributes": [], "attributes": [],
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 89, "start": 89,
"end": 90, "end": 90,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }
@ -153,14 +153,14 @@
"skip": false "skip": false
}, },
"then": { "then": {
"type": "ThenBlock",
"start": 90, "start": 90,
"end": 100, "end": 100,
"type": "ThenBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 99, "start": 99,
"end": 100, "end": 100,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }
@ -168,24 +168,24 @@
"skip": false "skip": false
}, },
"catch": { "catch": {
"type": "CatchBlock",
"start": null, "start": null,
"end": null, "end": null,
"type": "CatchBlock",
"children": [], "children": [],
"skip": true "skip": true
} }
}, },
{ {
"type": "Text",
"start": 108, "start": 108,
"end": 110, "end": 110,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "AwaitBlock",
"start": 110, "start": 110,
"end": 148, "end": 148,
"type": "AwaitBlock",
"expression": { "expression": {
"type": "Literal", "type": "Literal",
"start": 118, "start": 118,
@ -211,29 +211,29 @@
}, },
"error": null, "error": null,
"pending": { "pending": {
"type": "PendingBlock",
"start": 123, "start": 123,
"end": 130, "end": 130,
"type": "PendingBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 123, "start": 123,
"end": 125, "end": 125,
"type": "Text",
"raw": "\n\t", "raw": "\n\t",
"data": "\n\t" "data": "\n\t"
}, },
{ {
"type": "Element",
"start": 125, "start": 125,
"end": 129, "end": 129,
"type": "Element",
"name": "br", "name": "br",
"attributes": [], "attributes": [],
"children": [] "children": []
}, },
{ {
"type": "Text",
"start": 129, "start": 129,
"end": 130, "end": 130,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }
@ -241,14 +241,14 @@
"skip": false "skip": false
}, },
"then": { "then": {
"type": "ThenBlock",
"start": 130, "start": 130,
"end": 140, "end": 140,
"type": "ThenBlock",
"children": [ "children": [
{ {
"type": "Text",
"start": 139, "start": 139,
"end": 140, "end": 140,
"type": "Text",
"raw": "\n", "raw": "\n",
"data": "\n" "data": "\n"
} }
@ -256,9 +256,9 @@
"skip": false "skip": false
}, },
"catch": { "catch": {
"type": "CatchBlock",
"start": null, "start": null,
"end": null, "end": null,
"type": "CatchBlock",
"children": [], "children": [],
"skip": true "skip": true
} }

@ -1,27 +1,27 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 34, "end": 34,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 34, "end": 34,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 3, "start": 3,
"end": 4, "end": 4,
"type": "Text",
"raw": " ", "raw": " ",
"data": " " "data": " "
}, },
{ {
"type": "RawMustacheTag",
"start": 4, "start": 4,
"end": 16, "end": 16,
"type": "RawMustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 11, "start": 11,
@ -40,16 +40,16 @@
} }
}, },
{ {
"type": "Text",
"start": 16, "start": 16,
"end": 17, "end": 17,
"type": "Text",
"raw": " ", "raw": " ",
"data": " " "data": " "
}, },
{ {
"type": "RawMustacheTag",
"start": 17, "start": 17,
"end": 29, "end": 29,
"type": "RawMustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 24, "start": 24,
@ -68,9 +68,9 @@
} }
}, },
{ {
"type": "Text",
"start": 29, "start": 29,
"end": 30, "end": 30,
"type": "Text",
"raw": " ", "raw": " ",
"data": " " "data": " "
} }

@ -1,20 +1,20 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 30, "start": 30,
"end": 63, "end": 63,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 28, "start": 28,
"end": 30, "end": 30,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "Element",
"start": 30, "start": 30,
"end": 63, "end": 63,
"type": "Element",
"name": "canvas", "name": "canvas",
"attributes": [ "attributes": [
{ {

@ -1,34 +1,34 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 79, "start": 79,
"end": 101, "end": 101,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 77, "start": 77,
"end": 79, "end": 79,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "Element",
"start": 79, "start": 79,
"end": 101, "end": 101,
"type": "Element",
"name": "h1", "name": "h1",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 83, "start": 83,
"end": 89, "end": 89,
"type": "Text",
"raw": "Hello ", "raw": "Hello ",
"data": "Hello " "data": "Hello "
}, },
{ {
"type": "MustacheTag",
"start": 89, "start": 89,
"end": 95, "end": 95,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 90, "start": 90,
@ -47,9 +47,9 @@
} }
}, },
{ {
"type": "Text",
"start": 95, "start": 95,
"end": 96, "end": 96,
"type": "Text",
"raw": "!", "raw": "!",
"data": "!" "data": "!"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 62, "start": 62,
"end": 60, "end": 60,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 60, "start": 60,
"end": 62, "end": 62,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
} }

@ -1,34 +1,34 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 41, "start": 41,
"end": 63, "end": 63,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 39, "start": 39,
"end": 41, "end": 41,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "Element",
"start": 41, "start": 41,
"end": 63, "end": 63,
"type": "Element",
"name": "h1", "name": "h1",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 45, "start": 45,
"end": 51, "end": 51,
"type": "Text",
"raw": "Hello ", "raw": "Hello ",
"data": "Hello " "data": "Hello "
}, },
{ {
"type": "MustacheTag",
"start": 51, "start": 51,
"end": 57, "end": 57,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 52, "start": 52,
@ -47,9 +47,9 @@
} }
}, },
{ {
"type": "Text",
"start": 57, "start": 57,
"end": 58, "end": 58,
"type": "Text",
"raw": "!", "raw": "!",
"data": "!" "data": "!"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 6, "end": 6,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 6, "end": 6,
"type": "Element",
"name": "div", "name": "div",
"attributes": [], "attributes": [],
"children": [] "children": []

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 57, "end": 57,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "IfBlock",
"start": 0, "start": 0,
"end": 57, "end": 57,
"type": "IfBlock",
"expression": { "expression": {
"type": "BinaryExpression", "type": "BinaryExpression",
"start": 5, "start": 5,
@ -59,21 +59,21 @@
}, },
"children": [ "children": [
{ {
"start": 17,
"end": 51,
"type": "InlineComponent", "type": "InlineComponent",
"name": "svelte:self", "name": "svelte:self",
"start": 17,
"end": 51,
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 30, "start": 30,
"end": 49, "end": 49,
"type": "Attribute",
"name": "depth", "name": "depth",
"value": [ "value": [
{ {
"type": "MustacheTag",
"start": 37, "start": 37,
"end": 48, "end": 48,
"type": "MustacheTag",
"expression": { "expression": {
"type": "BinaryExpression", "type": "BinaryExpression",
"start": 38, "start": 38,

@ -1,26 +1,26 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 45, "end": 45,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "InlineComponent",
"start": 0, "start": 0,
"end": 45, "end": 45,
"type": "InlineComponent",
"name": "Component", "name": "Component",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Element",
"start": 11, "start": 11,
"end": 33, "end": 33,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Attribute",
"start": 16, "start": 16,
"end": 26, "end": 26,
"type": "Attribute",
"name": "slot", "name": "slot",
"value": [ "value": [
{ {

@ -1,27 +1,27 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 24, "end": 24,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 24, "end": 24,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 3, "start": 3,
"end": 4, "end": 4,
"type": "Text",
"raw": " ", "raw": " ",
"data": " " "data": " "
}, },
{ {
"type": "MustacheTag",
"start": 4, "start": 4,
"end": 7, "end": 7,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 5, "start": 5,
@ -40,16 +40,16 @@
} }
}, },
{ {
"type": "Text",
"start": 7, "start": 7,
"end": 8, "end": 8,
"type": "Text",
"raw": " ", "raw": " ",
"data": " " "data": " "
}, },
{ {
"type": "MustacheTag",
"start": 8, "start": 8,
"end": 11, "end": 11,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 9, "start": 9,
@ -68,16 +68,16 @@
} }
}, },
{ {
"type": "Text",
"start": 11, "start": 11,
"end": 14, "end": 14,
"type": "Text",
"raw": " : ", "raw": " : ",
"data": " : " "data": " : "
}, },
{ {
"type": "MustacheTag",
"start": 14, "start": 14,
"end": 17, "end": 17,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 15, "start": 15,
@ -96,9 +96,9 @@
} }
}, },
{ {
"type": "Text",
"start": 17, "start": 17,
"end": 20, "end": 20,
"type": "Text",
"raw": " : ", "raw": " : ",
"data": " : " "data": " : "
} }

@ -1,19 +1,19 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 22, "end": 22,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 22, "end": 22,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
"type": "Spread",
"start": 5, "start": 5,
"end": 15, "end": 15,
"type": "Spread",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 9, "start": 9,

@ -1,27 +1,27 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 42, "end": 42,
"type": "Fragment",
"children": [ "children": [
{ {
"start": 0,
"end": 42,
"type": "Head", "type": "Head",
"name": "svelte:head", "name": "svelte:head",
"start": 0,
"end": 42,
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Element",
"start": 13, "start": 13,
"end": 28, "end": 28,
"type": "Element",
"name": "style", "name": "style",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 20, "start": 20,
"end": 20, "end": 20,
"type": "Text",
"data": "" "data": ""
} }
] ]

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 61, "end": 61,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 61, "end": 61,
"type": "Element",
"name": "textarea", "name": "textarea",
"attributes": [], "attributes": [],
"children": [ "children": [
@ -19,9 +19,9 @@
"data": "\n\t<p>not actually an element. " "data": "\n\t<p>not actually an element. "
}, },
{ {
"type": "MustacheTag",
"start": 40, "start": 40,
"end": 45, "end": 45,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 41, "start": 41,

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 117, "end": 117,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 117, "end": 117,
"type": "Element",
"name": "textarea", "name": "textarea",
"attributes": [], "attributes": [],
"children": [ "children": [
@ -19,9 +19,9 @@
"data": "\n\t<p>not actu </textar ally an element. " "data": "\n\t<p>not actu </textar ally an element. "
}, },
{ {
"type": "MustacheTag",
"start": 50, "start": 50,
"end": 55, "end": 55,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 51, "start": 51,

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 27, "end": 27,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 27, "end": 27,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -23,9 +23,9 @@
], ],
"children": [ "children": [
{ {
"type": "Text",
"start": 13, "start": 13,
"end": 21, "end": 21,
"type": "Text",
"raw": "fades in", "raw": "fades in",
"data": "fades in" "data": "fades in"
} }

@ -1,13 +1,13 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 45, "end": 45,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 45, "end": 45,
"type": "Element",
"name": "div", "name": "div",
"attributes": [ "attributes": [
{ {
@ -91,9 +91,9 @@
], ],
"children": [ "children": [
{ {
"type": "Text",
"start": 31, "start": 31,
"end": 39, "end": 39,
"type": "Text",
"raw": "fades in", "raw": "fades in",
"data": "fades in" "data": "fades in"
} }

@ -1,41 +1,25 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 41, "end": 41,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "EachBlock",
"start": 0, "start": 0,
"end": 41, "end": 41,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"name": "things"
},
"children": [ "children": [
{ {
"type": "Element",
"start": 22, "start": 22,
"end": 33, "end": 33,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 25, "start": 25,
"end": 29, "end": 29,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 26, "start": 26,
@ -61,6 +45,22 @@
"name": "𐊧", "name": "𐊧",
"start": 17, "start": 17,
"end": 19 "end": 19
},
"expression": {
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"name": "things"
} }
} }
] ]

@ -1,34 +1,34 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 51, "start": 51,
"end": 73, "end": 73,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 49, "start": 49,
"end": 51, "end": 51,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
}, },
{ {
"type": "Element",
"start": 51, "start": 51,
"end": 73, "end": 73,
"type": "Element",
"name": "h1", "name": "h1",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 55, "start": 55,
"end": 61, "end": 61,
"type": "Text",
"raw": "Hello ", "raw": "Hello ",
"data": "Hello " "data": "Hello "
}, },
{ {
"type": "MustacheTag",
"start": 61, "start": 61,
"end": 67, "end": 67,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 62, "start": 62,
@ -47,9 +47,9 @@
} }
}, },
{ {
"type": "Text",
"start": 67, "start": 67,
"end": 68, "end": 68,
"type": "Text",
"raw": "!", "raw": "!",
"data": "!" "data": "!"
} }

@ -1,29 +1,29 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 14, "end": 14,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 14, "end": 14,
"type": "Element",
"name": "div", "name": "div",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 5, "start": 5,
"end": 8, "end": 8,
"type": "Text",
"raw": "foo", "raw": "foo",
"data": "foo" "data": "foo"
} }
] ]
}, },
{ {
"type": "Text",
"start": 14, "start": 14,
"end": 16, "end": 16,
"type": "Text",
"raw": "\n\n", "raw": "\n\n",
"data": "\n\n" "data": "\n\n"
} }
@ -39,9 +39,13 @@
"type": "Rule", "type": "Rule",
"prelude": { "prelude": {
"type": "SelectorList", "type": "SelectorList",
"start": 25,
"end": 28,
"children": [ "children": [
{ {
"type": "Selector", "type": "Selector",
"start": 25,
"end": 28,
"children": [ "children": [
{ {
"type": "TypeSelector", "type": "TypeSelector",
@ -49,27 +53,23 @@
"start": 25, "start": 25,
"end": 28 "end": 28
} }
], ]
"start": 25,
"end": 28
} }
], ]
"start": 25,
"end": 28
}, },
"block": { "block": {
"type": "Block", "type": "Block",
"start": 29,
"end": 47,
"children": [ "children": [
{ {
"type": "Declaration", "type": "Declaration",
"property": "color",
"value": "red",
"start": 33, "start": 33,
"end": 43 "end": 43,
"property": "color",
"value": "red"
} }
], ]
"start": 29,
"end": 47
}, },
"start": 25, "start": 25,
"end": 47 "end": 47

@ -1,27 +1,27 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 6, "start": 6,
"end": 36, "end": 36,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Text",
"start": 0, "start": 0,
"end": 6, "end": 6,
"type": "Text",
"raw": "\n\n\t\t\t\t", "raw": "\n\n\t\t\t\t",
"data": "\n\n\t\t\t\t" "data": "\n\n\t\t\t\t"
}, },
{ {
"type": "Element",
"start": 6, "start": 6,
"end": 36, "end": 36,
"type": "Element",
"name": "p", "name": "p",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 9, "start": 9,
"end": 32, "end": 32,
"type": "Text",
"raw": "just chillin' over here", "raw": "just chillin' over here",
"data": "just chillin' over here" "data": "just chillin' over here"
} }

@ -1,34 +1,34 @@
{ {
"html": { "html": {
"type": "Fragment",
"start": 0, "start": 0,
"end": 65, "end": 65,
"type": "Fragment",
"children": [ "children": [
{ {
"type": "Element",
"start": 0, "start": 0,
"end": 65, "end": 65,
"type": "Element",
"name": "h1", "name": "h1",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 4, "start": 4,
"end": 10, "end": 10,
"type": "Text",
"raw": "Hello ", "raw": "Hello ",
"data": "Hello " "data": "Hello "
}, },
{ {
"type": "Element",
"start": 10, "start": 10,
"end": 35, "end": 35,
"type": "Element",
"name": "strong", "name": "strong",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "MustacheTag",
"start": 18, "start": 18,
"end": 24, "end": 24,
"type": "MustacheTag",
"expression": { "expression": {
"type": "Identifier", "type": "Identifier",
"start": 19, "start": 19,
@ -47,25 +47,25 @@
} }
}, },
{ {
"type": "Text",
"start": 24, "start": 24,
"end": 26, "end": 26,
"type": "Text",
"raw": "! ", "raw": "! ",
"data": "! " "data": "! "
} }
] ]
}, },
{ {
"type": "Element",
"start": 35, "start": 35,
"end": 60, "end": 60,
"type": "Element",
"name": "span", "name": "span",
"attributes": [], "attributes": [],
"children": [ "children": [
{ {
"type": "Text",
"start": 41, "start": 41,
"end": 53, "end": 53,
"type": "Text",
"raw": "How are you?", "raw": "How are you?",
"data": "How are you?" "data": "How are you?"
} }

@ -9,7 +9,7 @@ export default function Function_prop_no_getter($$anchor, $$props) {
let count = $.source(0); let count = $.source(0);
function onmouseup() { function onmouseup() {
$.set(count, $.get(count) + 2); $.set(count, $.proxy($.get(count) + 2));
} }
/* Init */ /* Init */
@ -17,7 +17,7 @@ export default function Function_prop_no_getter($$anchor, $$props) {
var node = $.child_frag(fragment); var node = $.child_frag(fragment);
Button(node, { Button(node, {
onmousedown: () => $.set(count, $.get(count) + 1), onmousedown: () => $.set(count, $.proxy($.get(count) + 1)),
onmouseup, onmouseup,
children: ($$anchor, $$slotProps) => { children: ($$anchor, $$slotProps) => {
/* Init */ /* Init */

Loading…
Cancel
Save