UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

262 lines (261 loc) 4.55 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 import CustomDropdown from './_CustomDropdown.svelte';\n\n function handleSelect(event) {\n // handle event\n }\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 9, "column": 1, "offset": 218 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 9, "column": 10, "offset": 227 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 9, "column": 10, "offset": 227 }, "end": { "line": 11, "column": 1, "offset": 229 } } }, { "type": "svelteComponent", "tagName": "Dropdown", "properties": [ { "type": "svelteProperty", "name": "MenuComponent", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 11, "column": 26, "offset": 254 }, "end": { "line": 11, "column": 42, "offset": 270 } }, "expression": { "type": "svelteExpression", "value": "CustomDropdown", "position": { "start": { "line": 11, "column": 27, "offset": 255 }, "end": { "line": 11, "column": 41, "offset": 269 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 11, "column": 11, "offset": 239 }, "end": { "line": 11, "column": 43, "offset": 271 } } }, { "type": "svelteDirective", "name": "on", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 11, "column": 55, "offset": 283 }, "end": { "line": 11, "column": 69, "offset": 297 } }, "expression": { "type": "svelteExpression", "value": "handleSelect", "position": { "start": { "line": 11, "column": 56, "offset": 284 }, "end": { "line": 11, "column": 68, "offset": 296 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 11, "column": 44, "offset": 272 }, "end": { "line": 11, "column": 70, "offset": 298 } }, "specifier": "select" } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n ", "position": { "start": { "line": 11, "column": 71, "offset": 299 }, "end": { "line": 12, "column": 3, "offset": 302 } } }, { "type": "svelteComponent", "tagName": "Button", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n Fully custom menu\n ", "position": { "start": { "line": 12, "column": 11, "offset": 310 }, "end": { "line": 14, "column": 3, "offset": 335 } } } ], "position": { "start": { "line": 12, "column": 3, "offset": 302 }, "end": { "line": 14, "column": 12, "offset": 344 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 14, "column": 12, "offset": 344 }, "end": { "line": 15, "column": 1, "offset": 345 } } } ], "position": { "start": { "line": 11, "column": 1, "offset": 229 }, "end": { "line": 15, "column": 12, "offset": 356 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 15, "column": 12, "offset": 356 } } }