UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

512 lines (511 loc) 10.1 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\timport contributors from '../_contributors.js';\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 3, "column": 1, "offset": 58 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 10, "offset": 67 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 3, "column": 10, "offset": 67 }, "end": { "line": 5, "column": 1, "offset": 69 } } }, { "type": "svelteStyle", "tagName": "style", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t.contributor {\n\t\twidth: 2.4em;\n\t\theight: 2.4em;\n\t\tborder-radius: 50%;\n\t\ttext-indent: -9999px;\n\t\tdisplay: inline-block;\n\t\tbackground: no-repeat url(/contributors.jpg);\n\t\tbackground-size: auto 102%;\n\t\tmargin: 0 0.5em 0.5em 0;\n\t\tborder: 2px solid var(--second);\n\t}\n", "position": { "start": { "line": 5, "column": 8, "offset": 76 }, "end": { "line": 17, "column": 1, "offset": 340 } } } ], "position": { "start": { "line": 5, "column": 1, "offset": 69 }, "end": { "line": 17, "column": 9, "offset": 348 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 17, "column": 9, "offset": 348 }, "end": { "line": 19, "column": 1, "offset": 350 } } }, { "type": "svelteBranchingBlock", "name": "each", "branches": [ { "type": "svelteBranch", "name": "each", "expression": { "type": "svelteExpression", "value": "contributors as contributor, i", "position": { "start": { "line": 19, "column": 8, "offset": 357 }, "end": { "line": 19, "column": 38, "offset": 387 } } }, "children": [ { "type": "text", "value": "\n\t", "position": { "start": { "line": 19, "column": 39, "offset": 388 }, "end": { "line": 20, "column": 2, "offset": 390 } } }, { "type": "svelteElement", "tagName": "a", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "contributor", "position": { "start": { "line": 21, "column": 10, "offset": 402 }, "end": { "line": 21, "column": 22, "offset": 414 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 21, "column": 3, "offset": 395 }, "end": { "line": 21, "column": 22, "offset": 414 } } }, { "type": "svelteProperty", "name": "style", "value": [ { "type": "text", "value": "background-position:", "position": { "start": { "line": 22, "column": 10, "offset": 424 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 22, "column": 30, "offset": 444 }, "end": { "line": 22, "column": 31, "offset": 445 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 22, "column": 31, "offset": 445 }, "end": { "line": 22, "column": 70, "offset": 484 } }, "expression": { "type": "svelteExpression", "value": "(100 * i) / (contributors.length - 1)", "position": { "start": { "line": 22, "column": 32, "offset": 446 }, "end": { "line": 22, "column": 69, "offset": 483 } } } }, { "type": "text", "value": "%", "position": { "start": { "line": 22, "column": 70, "offset": 484 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 22, "column": 71, "offset": 485 }, "end": {} } }, { "type": "text", "value": "0", "position": { "start": { "line": 22, "column": 72, "offset": 486 }, "end": { "line": 22, "column": 74, "offset": 488 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 22, "column": 3, "offset": 417 }, "end": { "line": 22, "column": 74, "offset": 488 } } }, { "type": "svelteProperty", "name": "href", "value": [ { "type": "text", "value": "https://github.com/", "position": { "start": { "line": 23, "column": 9, "offset": 497 }, "end": { "line": 23, "column": 28, "offset": 516 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 23, "column": 28, "offset": 516 }, "end": { "line": 23, "column": 41, "offset": 529 } }, "expression": { "type": "svelteExpression", "value": "contributor", "position": { "start": { "line": 23, "column": 29, "offset": 517 }, "end": { "line": 23, "column": 40, "offset": 528 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 23, "column": 3, "offset": 491 }, "end": { "line": 23, "column": 42, "offset": 530 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t", "position": { "start": { "line": 23, "column": 43, "offset": 531 }, "end": { "line": 24, "column": 3, "offset": 534 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 24, "column": 3, "offset": 534 }, "end": { "line": 24, "column": 16, "offset": 547 } }, "expression": { "type": "svelteExpression", "value": "contributor", "position": { "start": { "line": 24, "column": 4, "offset": 535 }, "end": { "line": 24, "column": 15, "offset": 546 } } } }, { "type": "text", "value": "\n\t", "position": { "start": { "line": 24, "column": 16, "offset": 547 }, "end": { "line": 25, "column": 2, "offset": 549 } } } ], "position": { "start": { "line": 20, "column": 2, "offset": 390 }, "end": { "line": 25, "column": 6, "offset": 553 } } }, { "type": "text", "value": "\n", "position": { "start": { "line": 25, "column": 6, "offset": 553 }, "end": { "line": 26, "column": 1, "offset": 554 } } } ], "position": { "start": { "line": 19, "column": 1, "offset": 350 }, "end": { "line": 26, "column": 1, "offset": 554 } } } ], "position": { "start": { "line": 19, "column": 1, "offset": 350 }, "end": { "line": 26, "column": 8, "offset": 561 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 26, "column": 8, "offset": 561 } } }