UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

312 lines (311 loc) 5.59 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n import Button from '@sveltekit/ui/Button';\n import Dropdown from '@sveltekit/ui/Dropdown';\n\n export let items = [\n {\n label: 'Menu Item 1',\n id: 1\n },\n {\n label: 'Menu Item 2',\n id: 2\n },\n {\n label: 'Menu Item 3',\n id: 3\n }\n ];\n\n let isMulti = true;\n let isSearchable = true;\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 22, "column": 1, "offset": 340 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 22, "column": 10, "offset": 349 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 22, "column": 10, "offset": 349 }, "end": { "line": 24, "column": 1, "offset": 351 } } }, { "type": "svelteComponent", "tagName": "Dropdown", "properties": [ { "type": "svelteProperty", "name": "items", "value": [ { "type": "svelteDynamicContent", "expression": { "type": "svelteExpression", "value": "items", "position": { "start": { "line": 24, "column": 12, "offset": 362 }, "end": { "line": 24, "column": 17, "offset": 367 } } }, "position": { "start": { "line": 24, "column": 11, "offset": 361 }, "end": { "line": 24, "column": 17, "offset": 367 } } } ], "modifiers": [], "shorthand": "expression", "position": { "start": { "line": 24, "column": 11, "offset": 361 }, "end": { "line": 24, "column": 17, "offset": 367 } } }, { "type": "svelteProperty", "name": "isMulti", "value": [ { "type": "svelteDynamicContent", "expression": { "type": "svelteExpression", "value": "isMulti", "position": { "start": { "line": 24, "column": 20, "offset": 370 }, "end": { "line": 24, "column": 27, "offset": 377 } } }, "position": { "start": { "line": 24, "column": 19, "offset": 369 }, "end": { "line": 24, "column": 27, "offset": 377 } } } ], "modifiers": [], "shorthand": "expression", "position": { "start": { "line": 24, "column": 19, "offset": 369 }, "end": { "line": 24, "column": 27, "offset": 377 } } }, { "type": "svelteProperty", "name": "isSearchable", "value": [ { "type": "svelteDynamicContent", "expression": { "type": "svelteExpression", "value": "isSearchable", "position": { "start": { "line": 24, "column": 30, "offset": 380 }, "end": { "line": 24, "column": 42, "offset": 392 } } }, "position": { "start": { "line": 24, "column": 29, "offset": 379 }, "end": { "line": 24, "column": 42, "offset": 392 } } } ], "modifiers": [], "shorthand": "expression", "position": { "start": { "line": 24, "column": 29, "offset": 379 }, "end": { "line": 24, "column": 42, "offset": 392 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n ", "position": { "start": { "line": 24, "column": 44, "offset": 394 }, "end": { "line": 25, "column": 3, "offset": 397 } } }, { "type": "svelteComponent", "tagName": "Button", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "Click me", "position": { "start": { "line": 25, "column": 11, "offset": 405 }, "end": { "line": 25, "column": 19, "offset": 413 } } } ], "position": { "start": { "line": 25, "column": 3, "offset": 397 }, "end": { "line": 25, "column": 28, "offset": 422 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 25, "column": 28, "offset": 422 }, "end": { "line": 26, "column": 1, "offset": 423 } } } ], "position": { "start": { "line": 24, "column": 1, "offset": 351 }, "end": { "line": 26, "column": 12, "offset": 434 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 26, "column": 12, "offset": 434 } } }