UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

569 lines (568 loc) 11.2 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\timport { title, comicSans, box } from './styles.js';\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 3, "column": 1, "offset": 63 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 10, "offset": 72 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 3, "column": 10, "offset": 72 }, "end": { "line": 5, "column": 1, "offset": 74 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 5, "column": 13, "offset": 86 }, "end": { "line": 5, "column": 20, "offset": 93 } }, "expression": { "type": "svelteExpression", "value": "title", "position": { "start": { "line": 5, "column": 14, "offset": 87 }, "end": { "line": 5, "column": 19, "offset": 92 } } } }, { "type": "text", "value": " ", "position": { "start": { "line": 5, "column": 20, "offset": 93 }, "end": { "line": 5, "column": 21, "offset": 94 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 5, "column": 21, "offset": 94 }, "end": { "line": 5, "column": 32, "offset": 105 } }, "expression": { "type": "svelteExpression", "value": "comicSans", "position": { "start": { "line": 5, "column": 22, "offset": 95 }, "end": { "line": 5, "column": 31, "offset": 104 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 5, "column": 6, "offset": 79 }, "end": { "line": 5, "column": 33, "offset": 106 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t", "position": { "start": { "line": 5, "column": 34, "offset": 107 }, "end": { "line": 6, "column": 2, "offset": 109 } } }, { "type": "svelteElement", "tagName": "h1", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t", "position": { "start": { "line": 6, "column": 6, "offset": 113 }, "end": { "line": 7, "column": 3, "offset": 116 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 7, "column": 14, "offset": 127 }, "end": { "line": 7, "column": 19, "offset": 132 } }, "expression": { "type": "svelteExpression", "value": "box", "position": { "start": { "line": 7, "column": 15, "offset": 128 }, "end": { "line": 7, "column": 18, "offset": 131 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 7, "column": 8, "offset": 121 }, "end": { "line": 7, "column": 19, "offset": 132 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t\t", "position": { "start": { "line": 7, "column": 20, "offset": 133 }, "end": { "line": 8, "column": 4, "offset": 137 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 8, "column": 15, "offset": 148 }, "end": { "line": 8, "column": 20, "offset": 153 } }, "expression": { "type": "svelteExpression", "value": "box", "position": { "start": { "line": 8, "column": 16, "offset": 149 }, "end": { "line": 8, "column": 19, "offset": 152 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 8, "column": 9, "offset": 142 }, "end": { "line": 8, "column": 20, "offset": 153 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t\t\t", "position": { "start": { "line": 8, "column": 21, "offset": 154 }, "end": { "line": 9, "column": 5, "offset": 159 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 9, "column": 16, "offset": 170 }, "end": { "line": 9, "column": 21, "offset": 175 } }, "expression": { "type": "svelteExpression", "value": "box", "position": { "start": { "line": 9, "column": 17, "offset": 171 }, "end": { "line": 9, "column": 20, "offset": 174 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 9, "column": 10, "offset": 164 }, "end": { "line": 9, "column": 21, "offset": 175 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "CSS", "position": { "start": { "line": 9, "column": 22, "offset": 176 }, "end": { "line": 9, "column": 25, "offset": 179 } } } ], "position": { "start": { "line": 9, "column": 5, "offset": 159 }, "end": { "line": 9, "column": 31, "offset": 185 } } }, { "type": "text", "value": "\n\t\t\t\tin JS\n\t\t\t", "position": { "start": { "line": 9, "column": 31, "offset": 185 }, "end": { "line": 11, "column": 4, "offset": 199 } } } ], "position": { "start": { "line": 8, "column": 4, "offset": 137 }, "end": { "line": 11, "column": 10, "offset": 205 } } }, { "type": "text", "value": "\n\t\t\tin HTML\n\t\t", "position": { "start": { "line": 11, "column": 10, "offset": 205 }, "end": { "line": 13, "column": 3, "offset": 219 } } } ], "position": { "start": { "line": 7, "column": 3, "offset": 116 }, "end": { "line": 13, "column": 9, "offset": 225 } } }, { "type": "text", "value": "\n\t", "position": { "start": { "line": 13, "column": 9, "offset": 225 }, "end": { "line": 14, "column": 2, "offset": 227 } } } ], "position": { "start": { "line": 6, "column": 2, "offset": 109 }, "end": { "line": 14, "column": 7, "offset": 232 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 14, "column": 7, "offset": 232 }, "end": { "line": 15, "column": 1, "offset": 233 } } } ], "position": { "start": { "line": 5, "column": 1, "offset": 74 }, "end": { "line": 15, "column": 7, "offset": 239 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 15, "column": 7, "offset": 239 } } }