UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

491 lines (490 loc) 8.57 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\texport let name;\n\texport let version;\n\texport let speed;\n\texport let website;\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 6, "column": 1, "offset": 88 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 6, "column": 10, "offset": 97 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 6, "column": 10, "offset": 97 }, "end": { "line": 8, "column": 1, "offset": 99 } } }, { "type": "svelteElement", "tagName": "p", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\tThe ", "position": { "start": { "line": 8, "column": 4, "offset": 102 }, "end": { "line": 9, "column": 6, "offset": 108 } } }, { "type": "svelteElement", "tagName": "code", "properties": [], "selfClosing": false, "children": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 9, "column": 12, "offset": 114 }, "end": { "line": 9, "column": 18, "offset": 120 } }, "expression": { "type": "svelteExpression", "value": "name", "position": { "start": { "line": 9, "column": 13, "offset": 115 }, "end": { "line": 9, "column": 17, "offset": 119 } } } } ], "position": { "start": { "line": 9, "column": 6, "offset": 108 }, "end": { "line": 9, "column": 25, "offset": 127 } } }, { "type": "text", "value": " package is ", "position": { "start": { "line": 9, "column": 25, "offset": 127 }, "end": { "line": 9, "column": 37, "offset": 139 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 9, "column": 37, "offset": 139 }, "end": { "line": 9, "column": 44, "offset": 146 } }, "expression": { "type": "svelteExpression", "value": "speed", "position": { "start": { "line": 9, "column": 38, "offset": 140 }, "end": { "line": 9, "column": 43, "offset": 145 } } } }, { "type": "text", "value": " fast.\n\tDownload version ", "position": { "start": { "line": 9, "column": 44, "offset": 146 }, "end": { "line": 10, "column": 19, "offset": 171 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 10, "column": 19, "offset": 171 }, "end": { "line": 10, "column": 28, "offset": 180 } }, "expression": { "type": "svelteExpression", "value": "version", "position": { "start": { "line": 10, "column": 20, "offset": 172 }, "end": { "line": 10, "column": 27, "offset": 179 } } } }, { "type": "text", "value": " from ", "position": { "start": { "line": 10, "column": 28, "offset": 180 }, "end": { "line": 10, "column": 34, "offset": 186 } } }, { "type": "svelteElement", "tagName": "a", "properties": [ { "type": "svelteProperty", "name": "href", "value": [ { "type": "text", "value": "https://www.npmjs.com/package/", "position": { "start": { "line": 10, "column": 43, "offset": 195 }, "end": { "line": 10, "column": 73, "offset": 225 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 10, "column": 73, "offset": 225 }, "end": { "line": 10, "column": 79, "offset": 231 } }, "expression": { "type": "svelteExpression", "value": "name", "position": { "start": { "line": 10, "column": 74, "offset": 226 }, "end": { "line": 10, "column": 78, "offset": 230 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 10, "column": 37, "offset": 189 }, "end": { "line": 10, "column": 80, "offset": 232 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "npm", "position": { "start": { "line": 10, "column": 81, "offset": 233 }, "end": { "line": 10, "column": 84, "offset": 236 } } } ], "position": { "start": { "line": 10, "column": 34, "offset": 186 }, "end": { "line": 10, "column": 88, "offset": 240 } } }, { "type": "text", "value": "\n\tand ", "position": { "start": { "line": 10, "column": 88, "offset": 240 }, "end": { "line": 11, "column": 6, "offset": 246 } } }, { "type": "svelteElement", "tagName": "a", "properties": [ { "type": "svelteProperty", "name": "href", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 11, "column": 14, "offset": 254 }, "end": { "line": 11, "column": 23, "offset": 263 } }, "expression": { "type": "svelteExpression", "value": "website", "position": { "start": { "line": 11, "column": 15, "offset": 255 }, "end": { "line": 11, "column": 22, "offset": 262 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 11, "column": 9, "offset": 249 }, "end": { "line": 11, "column": 23, "offset": 263 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "learn more here", "position": { "start": { "line": 11, "column": 24, "offset": 264 }, "end": { "line": 11, "column": 39, "offset": 279 } } } ], "position": { "start": { "line": 11, "column": 6, "offset": 246 }, "end": { "line": 11, "column": 43, "offset": 283 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 11, "column": 43, "offset": 283 }, "end": { "line": 12, "column": 1, "offset": 284 } } } ], "position": { "start": { "line": 8, "column": 1, "offset": 99 }, "end": { "line": 12, "column": 5, "offset": 288 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 12, "column": 5, "offset": 288 } } }