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": "description", "position": { "start": { "line": 2, "column": 12, "offset": 17 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 2, "column": 23, "offset": 28 }, "end": { "line": 2, "column": 24, "offset": 29 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 2, "column": 24, "offset": 29 }, "end": { "line": 2, "column": 35, "offset": 40 } }, "expression": { "type": "svelteExpression", "value": "className", "position": { "start": { "line": 2, "column": 25, "offset": 30 }, "end": { "line": 2, "column": 34, "offset": 39 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 2, "column": 5, "offset": 10 }, "end": { "line": 2, "column": 36, "offset": 41 } } }, { "type": "svelteProperty", "name": "...exclude($$props, ['class'])", "value": [ { "type": "svelteDynamicContent", "expression": { "type": "svelteExpression", "value": "...exclude($$props, ['class'])", "position": { "start": { "line": 3, "column": 6, "offset": 47 }, "end": { "line": 3, "column": 36, "offset": 77 } } }, "position": { "start": { "line": 3, "column": 5, "offset": 46 }, "end": { "line": 3, "column": 36, "offset": 77 } } } ], "modifiers": [], "shorthand": "expression", "position": { "start": { "line": 3, "column": 5, "offset": 46 }, "end": { "line": 3, "column": 36, "offset": 77 } } } ], "selfClosing": false, "children": [ { "type": "svelteElement", "tagName": "slot", "properties": [], "selfClosing": false, "children": [], "position": { "start": { "line": 4, "column": 2, "offset": 80 }, "end": { "line": 4, "column": 15, "offset": 93 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 21, "offset": 99 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 4, "column": 21, "offset": 99 }, "end": { "line": 6, "column": 1, "offset": 101 } } }, { "type": "svelteScript", "tagName": "script", "properties": [ { "type": "svelteProperty", "name": "context", "value": [ { "type": "text", "value": "module", "position": { "start": { "line": 6, "column": 18, "offset": 118 }, "end": { "line": 6, "column": 25, "offset": 125 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 6, "column": 9, "offset": 109 }, "end": { "line": 6, "column": 25, "offset": 125 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n import { exclude } from '../../lib'\n", "position": { "start": { "line": 6, "column": 26, "offset": 126 }, "end": { "line": 8, "column": 1, "offset": 167 } } } ], "position": { "start": { "line": 6, "column": 1, "offset": 101 }, "end": { "line": 8, "column": 10, "offset": 176 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 8, "column": 10, "offset": 176 }, "end": { "line": 10, "column": 1, "offset": 178 } } }, { "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": 186 }, "end": { "line": 13, "column": 1, "offset": 244 } } } ], "position": { "start": { "line": 10, "column": 1, "offset": 178 }, "end": { "line": 13, "column": 10, "offset": 253 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 13, "column": 10, "offset": 253 } } }