UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

298 lines (297 loc) 5.19 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\tlet hovering;\n\n\tfunction enter() {\n\t\thovering = true;\n\t}\n\n\tfunction leave() {\n\t\thovering = false;\n\t}\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 11, "column": 1, "offset": 111 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 11, "column": 10, "offset": 120 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 11, "column": 10, "offset": 120 }, "end": { "line": 13, "column": 1, "offset": 122 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteDirective", "name": "on", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 13, "column": 20, "offset": 141 }, "end": { "line": 13, "column": 27, "offset": 148 } }, "expression": { "type": "svelteExpression", "value": "enter", "position": { "start": { "line": 13, "column": 21, "offset": 142 }, "end": { "line": 13, "column": 26, "offset": 147 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 13, "column": 6, "offset": 127 }, "end": { "line": 13, "column": 27, "offset": 148 } }, "specifier": "mouseenter" }, { "type": "svelteDirective", "name": "on", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 13, "column": 42, "offset": 163 }, "end": { "line": 13, "column": 49, "offset": 170 } }, "expression": { "type": "svelteExpression", "value": "leave", "position": { "start": { "line": 13, "column": 43, "offset": 164 }, "end": { "line": 13, "column": 48, "offset": 169 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 13, "column": 28, "offset": 149 }, "end": { "line": 13, "column": 49, "offset": 170 } }, "specifier": "mouseleave" } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t", "position": { "start": { "line": 13, "column": 50, "offset": 171 }, "end": { "line": 14, "column": 2, "offset": 173 } } }, { "type": "svelteElement", "tagName": "slot", "properties": [ { "type": "svelteProperty", "name": "hovering", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 14, "column": 17, "offset": 188 }, "end": { "line": 14, "column": 27, "offset": 198 } }, "expression": { "type": "svelteExpression", "value": "hovering", "position": { "start": { "line": 14, "column": 18, "offset": 189 }, "end": { "line": 14, "column": 26, "offset": 197 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 14, "column": 8, "offset": 179 }, "end": { "line": 14, "column": 27, "offset": 198 } } } ], "selfClosing": false, "children": [], "position": { "start": { "line": 14, "column": 2, "offset": 173 }, "end": { "line": 14, "column": 35, "offset": 206 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 14, "column": 35, "offset": 206 }, "end": { "line": 15, "column": 1, "offset": 207 } } } ], "position": { "start": { "line": 13, "column": 1, "offset": 122 }, "end": { "line": 15, "column": 7, "offset": 213 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 15, "column": 7, "offset": 213 } } }