svelte-parse
Version:
An increidbly relaxed svelte-parser
495 lines (494 loc) • 8.54 kB
JSON
{
"type": "root",
"children": [
{
"type": "svelteScript",
"tagName": "script",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n import Chip from '@sveltekit/ui/Chip';\n",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 3,
"column": 1,
"offset": 50
}
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 10,
"offset": 59
}
}
},
{
"type": "text",
"value": "\n\n",
"position": {
"start": {
"line": 3,
"column": 10,
"offset": 59
},
"end": {
"line": 5,
"column": 1,
"offset": 61
}
}
},
{
"type": "svelteElement",
"tagName": "div",
"properties": [
{
"type": "svelteProperty",
"name": "class",
"value": [
{
"type": "text",
"value": "row",
"position": {
"start": {
"line": 5,
"column": 13,
"offset": 73
},
"end": {
"line": 5,
"column": 17,
"offset": 77
}
}
}
],
"modifiers": [],
"shorthand": "none",
"position": {
"start": {
"line": 5,
"column": 6,
"offset": 66
},
"end": {
"line": 5,
"column": 17,
"offset": 77
}
}
}
],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 5,
"column": 18,
"offset": 78
},
"end": {
"line": 6,
"column": 3,
"offset": 81
}
}
},
{
"type": "svelteElement",
"tagName": "span",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 6,
"column": 9,
"offset": 87
},
"end": {
"line": 7,
"column": 5,
"offset": 92
}
}
},
{
"type": "svelteComponent",
"tagName": "Chip",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "Default",
"position": {
"start": {
"line": 7,
"column": 11,
"offset": 98
},
"end": {
"line": 7,
"column": 18,
"offset": 105
}
}
}
],
"position": {
"start": {
"line": 7,
"column": 5,
"offset": 92
},
"end": {
"line": 7,
"column": 25,
"offset": 112
}
}
},
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 7,
"column": 25,
"offset": 112
},
"end": {
"line": 8,
"column": 3,
"offset": 115
}
}
}
],
"position": {
"start": {
"line": 6,
"column": 3,
"offset": 81
},
"end": {
"line": 8,
"column": 10,
"offset": 122
}
}
},
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 8,
"column": 10,
"offset": 122
},
"end": {
"line": 9,
"column": 3,
"offset": 125
}
}
},
{
"type": "svelteElement",
"tagName": "span",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 9,
"column": 9,
"offset": 131
},
"end": {
"line": 10,
"column": 5,
"offset": 136
}
}
},
{
"type": "svelteComponent",
"tagName": "Chip",
"properties": [
{
"type": "svelteProperty",
"name": "isActive",
"value": [],
"modifiers": [],
"shorthand": "boolean",
"position": {
"start": {
"line": 10,
"column": 11,
"offset": 142
},
"end": {
"line": 10,
"column": 19,
"offset": 150
}
}
}
],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "Active",
"position": {
"start": {
"line": 10,
"column": 20,
"offset": 151
},
"end": {
"line": 10,
"column": 26,
"offset": 157
}
}
}
],
"position": {
"start": {
"line": 10,
"column": 5,
"offset": 136
},
"end": {
"line": 10,
"column": 33,
"offset": 164
}
}
},
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 10,
"column": 33,
"offset": 164
},
"end": {
"line": 11,
"column": 3,
"offset": 167
}
}
}
],
"position": {
"start": {
"line": 9,
"column": 3,
"offset": 125
},
"end": {
"line": 11,
"column": 10,
"offset": 174
}
}
},
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 11,
"column": 10,
"offset": 174
},
"end": {
"line": 12,
"column": 3,
"offset": 177
}
}
},
{
"type": "svelteElement",
"tagName": "span",
"properties": [],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 12,
"column": 9,
"offset": 183
},
"end": {
"line": 13,
"column": 5,
"offset": 188
}
}
},
{
"type": "svelteComponent",
"tagName": "Chip",
"properties": [
{
"type": "svelteProperty",
"name": "isDisabled",
"value": [],
"modifiers": [],
"shorthand": "boolean",
"position": {
"start": {
"line": 13,
"column": 11,
"offset": 194
},
"end": {
"line": 13,
"column": 21,
"offset": 204
}
}
}
],
"selfClosing": false,
"children": [
{
"type": "text",
"value": "Disabled",
"position": {
"start": {
"line": 13,
"column": 22,
"offset": 205
},
"end": {
"line": 13,
"column": 30,
"offset": 213
}
}
}
],
"position": {
"start": {
"line": 13,
"column": 5,
"offset": 188
},
"end": {
"line": 13,
"column": 37,
"offset": 220
}
}
},
{
"type": "text",
"value": "\n ",
"position": {
"start": {
"line": 13,
"column": 37,
"offset": 220
},
"end": {
"line": 14,
"column": 3,
"offset": 223
}
}
}
],
"position": {
"start": {
"line": 12,
"column": 3,
"offset": 177
},
"end": {
"line": 14,
"column": 10,
"offset": 230
}
}
},
{
"type": "text",
"value": "\n",
"position": {
"start": {
"line": 14,
"column": 10,
"offset": 230
},
"end": {
"line": 15,
"column": 1,
"offset": 231
}
}
}
],
"position": {
"start": {
"line": 5,
"column": 1,
"offset": 61
},
"end": {
"line": 15,
"column": 7,
"offset": 237
}
}
}
],
"position": {
"start": {
"column": 1,
"line": 1,
"offset": 0
},
"end": {
"line": 15,
"column": 7,
"offset": 237
}
}
}