UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

329 lines (328 loc) 5.46 kB
{ "type": "root", "children": [ { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "title", "position": { "start": { "line": 2, "column": 12, "offset": 17 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 2, "column": 17, "offset": 22 }, "end": { "line": 2, "column": 18, "offset": 23 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 2, "column": 18, "offset": 23 }, "end": { "line": 2, "column": 29, "offset": 34 } }, "expression": { "type": "svelteExpression", "value": "className", "position": { "start": { "line": 2, "column": 19, "offset": 24 }, "end": { "line": 2, "column": 28, "offset": 33 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 2, "column": 5, "offset": 10 }, "end": { "line": 2, "column": 30, "offset": 35 } } }, { "type": "svelteProperty", "name": "...exclude($$props, ['class'])", "value": [ { "type": "svelteDynamicContent", "expression": { "type": "svelteExpression", "value": "...exclude($$props, ['class'])", "position": { "start": { "line": 3, "column": 6, "offset": 41 }, "end": { "line": 3, "column": 36, "offset": 71 } } }, "position": { "start": { "line": 3, "column": 5, "offset": 40 }, "end": { "line": 3, "column": 36, "offset": 71 } } } ], "modifiers": [], "shorthand": "expression", "position": { "start": { "line": 3, "column": 5, "offset": 40 }, "end": { "line": 3, "column": 36, "offset": 71 } } } ], "selfClosing": false, "children": [ { "type": "svelteElement", "tagName": "slot", "properties": [], "selfClosing": false, "children": [], "position": { "start": { "line": 4, "column": 2, "offset": 74 }, "end": { "line": 4, "column": 15, "offset": 87 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 21, "offset": 93 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 4, "column": 21, "offset": 93 }, "end": { "line": 6, "column": 1, "offset": 95 } } }, { "type": "svelteScript", "tagName": "script", "properties": [ { "type": "svelteProperty", "name": "context", "value": [ { "type": "text", "value": "module", "position": { "start": { "line": 6, "column": 18, "offset": 112 }, "end": { "line": 6, "column": 25, "offset": 119 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 6, "column": 9, "offset": 103 }, "end": { "line": 6, "column": 25, "offset": 119 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n import { exclude } from '../../lib'\n", "position": { "start": { "line": 6, "column": 26, "offset": 120 }, "end": { "line": 8, "column": 1, "offset": 161 } } } ], "position": { "start": { "line": 6, "column": 1, "offset": 95 }, "end": { "line": 8, "column": 10, "offset": 170 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 8, "column": 10, "offset": 170 }, "end": { "line": 10, "column": 1, "offset": 172 } } }, { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n let className = ''\n export { className as class }\n", "position": { "start": { "line": 10, "column": 9, "offset": 180 }, "end": { "line": 13, "column": 1, "offset": 238 } } } ], "position": { "start": { "line": 10, "column": 1, "offset": 172 }, "end": { "line": 13, "column": 10, "offset": 247 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 13, "column": 10, "offset": 247 } } }