UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

450 lines (449 loc) 7.7 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n import Alert, { options } from '@sveltekit/ui/Alert';\n import InformationIcon from '../../Icons/Information.svelte';\n\n export let warning = 'Warning! Hot food! 🔥🔥🔥🔥';\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 6, "column": 1, "offset": 184 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 6, "column": 10, "offset": 193 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 6, "column": 10, "offset": 193 }, "end": { "line": 8, "column": 1, "offset": 195 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "row", "position": { "start": { "line": 8, "column": 13, "offset": 207 }, "end": { "line": 8, "column": 17, "offset": 211 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 8, "column": 6, "offset": 200 }, "end": { "line": 8, "column": 17, "offset": 211 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n ", "position": { "start": { "line": 8, "column": 18, "offset": 212 }, "end": { "line": 9, "column": 3, "offset": 215 } } }, { "type": "svelteComponent", "tagName": "Alert", "properties": [], "selfClosing": false, "children": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 9, "column": 10, "offset": 222 }, "end": { "line": 9, "column": 19, "offset": 231 } }, "expression": { "type": "svelteExpression", "value": "warning", "position": { "start": { "line": 9, "column": 11, "offset": 223 }, "end": { "line": 9, "column": 18, "offset": 230 } } } } ], "position": { "start": { "line": 9, "column": 3, "offset": 215 }, "end": { "line": 9, "column": 27, "offset": 239 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 9, "column": 27, "offset": 239 }, "end": { "line": 10, "column": 1, "offset": 240 } } } ], "position": { "start": { "line": 8, "column": 1, "offset": 195 }, "end": { "line": 10, "column": 7, "offset": 246 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 10, "column": 7, "offset": 246 }, "end": { "line": 12, "column": 1, "offset": 248 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "row", "position": { "start": { "line": 12, "column": 13, "offset": 260 }, "end": { "line": 12, "column": 17, "offset": 264 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 12, "column": 6, "offset": 253 }, "end": { "line": 12, "column": 17, "offset": 264 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n ", "position": { "start": { "line": 12, "column": 18, "offset": 265 }, "end": { "line": 13, "column": 3, "offset": 268 } } }, { "type": "svelteComponent", "tagName": "Alert", "properties": [ { "type": "svelteProperty", "name": "type", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 13, "column": 15, "offset": 280 }, "end": { "line": 13, "column": 41, "offset": 306 } }, "expression": { "type": "svelteExpression", "value": "options.type.INFORMATION", "position": { "start": { "line": 13, "column": 16, "offset": 281 }, "end": { "line": 13, "column": 40, "offset": 305 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 13, "column": 10, "offset": 275 }, "end": { "line": 13, "column": 41, "offset": 306 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n ", "position": { "start": { "line": 13, "column": 42, "offset": 307 }, "end": { "line": 14, "column": 3, "offset": 310 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 14, "column": 3, "offset": 310 }, "end": { "line": 14, "column": 12, "offset": 319 } }, "expression": { "type": "svelteExpression", "value": "warning", "position": { "start": { "line": 14, "column": 4, "offset": 311 }, "end": { "line": 14, "column": 11, "offset": 318 } } } }, { "type": "text", "value": "\n ", "position": { "start": { "line": 14, "column": 12, "offset": 319 }, "end": { "line": 15, "column": 3, "offset": 322 } } } ], "position": { "start": { "line": 13, "column": 3, "offset": 268 }, "end": { "line": 15, "column": 11, "offset": 330 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 15, "column": 11, "offset": 330 }, "end": { "line": 16, "column": 1, "offset": 331 } } } ], "position": { "start": { "line": 12, "column": 1, "offset": 248 }, "end": { "line": 16, "column": 7, "offset": 337 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 16, "column": 7, "offset": 337 } } }