freeCodeCamp/tools/challenge-parser/parser/__fixtures__/ast-imports-extra.json

322 lines
8.5 KiB
JSON

{
"type": "root",
"children": [
{
"type": "leafDirective",
"name": "import",
"attributes": { "component": "Script", "from": "./script.md" },
"children": [],
"position": {
"start": { "line": 1, "column": 1, "offset": 0 },
"end": { "line": 1, "column": 49, "offset": 48 }
}
},
{
"type": "leafDirective",
"name": "import",
"attributes": { "component": "Second", "from": "./script-two.md" },
"children": [],
"position": {
"start": { "line": 2, "column": 1, "offset": 49 },
"end": { "line": 2, "column": 53, "offset": 101 }
}
},
{
"type": "leafDirective",
"name": "import",
"attributes": {},
"children": [],
"position": {
"start": { "line": 3, "column": 1, "offset": 102 },
"end": { "line": 3, "column": 9, "offset": 110 }
}
},
{
"type": "heading",
"depth": 1,
"children": [
{
"type": "text",
"value": "--description--",
"position": {
"start": { "line": 5, "column": 3, "offset": 114 },
"end": { "line": 5, "column": 18, "offset": 129 }
}
}
],
"position": {
"start": { "line": 5, "column": 1, "offset": 112 },
"end": { "line": 5, "column": 18, "offset": 129 }
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Paragraph 1 ::import",
"position": {
"start": { "line": 7, "column": 1, "offset": 131 },
"end": { "line": 7, "column": 21, "offset": 151 }
}
}
],
"position": {
"start": { "line": 7, "column": 1, "offset": 131 },
"end": { "line": 7, "column": 21, "offset": 151 }
}
},
{
"type": "code",
"lang": "html",
"meta": null,
"value": "code example",
"position": {
"start": { "line": 9, "column": 1, "offset": 153 },
"end": { "line": 11, "column": 4, "offset": 177 }
}
},
{
"type": "heading",
"depth": 1,
"children": [
{
"type": "text",
"value": "--instructions--",
"position": {
"start": { "line": 13, "column": 3, "offset": 181 },
"end": { "line": 13, "column": 19, "offset": 197 }
}
}
],
"position": {
"start": { "line": 13, "column": 1, "offset": 179 },
"end": { "line": 13, "column": 19, "offset": 197 }
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Paragraph 0",
"position": {
"start": { "line": 15, "column": 1, "offset": 199 },
"end": { "line": 15, "column": 12, "offset": 210 }
}
}
],
"position": {
"start": { "line": 15, "column": 1, "offset": 199 },
"end": { "line": 15, "column": 12, "offset": 210 }
}
},
{
"type": "code",
"lang": "html",
"meta": null,
"value": "code example 0",
"position": {
"start": { "line": 17, "column": 1, "offset": 212 },
"end": { "line": 19, "column": 4, "offset": 238 }
}
},
{
"type": "heading",
"depth": 1,
"children": [
{
"type": "text",
"value": "--hints--",
"position": {
"start": { "line": 21, "column": 3, "offset": 242 },
"end": { "line": 21, "column": 12, "offset": 251 }
}
}
],
"position": {
"start": { "line": 21, "column": 1, "offset": 240 },
"end": { "line": 21, "column": 12, "offset": 251 }
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "First hint",
"position": {
"start": { "line": 23, "column": 1, "offset": 253 },
"end": { "line": 23, "column": 11, "offset": 263 }
}
}
],
"position": {
"start": { "line": 23, "column": 1, "offset": 253 },
"end": { "line": 23, "column": 11, "offset": 263 }
}
},
{
"type": "code",
"lang": "js",
"meta": null,
"value": "// test code",
"position": {
"start": { "line": 25, "column": 1, "offset": 265 },
"end": { "line": 27, "column": 4, "offset": 287 }
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Second hint with ",
"position": {
"start": { "line": 29, "column": 1, "offset": 289 },
"end": { "line": 29, "column": 18, "offset": 306 }
}
},
{
"type": "html",
"value": "<code>",
"position": {
"start": { "line": 29, "column": 18, "offset": 306 },
"end": { "line": 29, "column": 24, "offset": 312 }
}
},
{
"type": "text",
"value": "code",
"position": {
"start": { "line": 29, "column": 24, "offset": 312 },
"end": { "line": 29, "column": 28, "offset": 316 }
}
},
{
"type": "html",
"value": "</code>",
"position": {
"start": { "line": 29, "column": 28, "offset": 316 },
"end": { "line": 29, "column": 35, "offset": 323 }
}
}
],
"position": {
"start": { "line": 29, "column": 1, "offset": 289 },
"end": { "line": 29, "column": 35, "offset": 323 }
}
},
{
"type": "code",
"lang": "js",
"meta": null,
"value": "// more test code",
"position": {
"start": { "line": 31, "column": 1, "offset": 325 },
"end": { "line": 33, "column": 4, "offset": 352 }
}
},
{
"type": "heading",
"depth": 1,
"children": [
{
"type": "text",
"value": "--seed--",
"position": {
"start": { "line": 36, "column": 3, "offset": 357 },
"end": { "line": 36, "column": 11, "offset": 365 }
}
}
],
"position": {
"start": { "line": 36, "column": 1, "offset": 355 },
"end": { "line": 36, "column": 11, "offset": 365 }
}
},
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "--seed-contents--",
"position": {
"start": { "line": 38, "column": 4, "offset": 370 },
"end": { "line": 38, "column": 21, "offset": 387 }
}
}
],
"position": {
"start": { "line": 38, "column": 1, "offset": 367 },
"end": { "line": 38, "column": 21, "offset": 387 }
}
},
{
"type": "code",
"lang": "html",
"meta": null,
"value": "<html>\n <body>\n </body>\n</html>",
"position": {
"start": { "line": 40, "column": 1, "offset": 389 },
"end": { "line": 45, "column": 4, "offset": 434 }
}
},
{
"type": "code",
"lang": "css",
"meta": null,
"value": "body {\n background: green;\n}",
"position": {
"start": { "line": 47, "column": 1, "offset": 436 },
"end": { "line": 51, "column": 4, "offset": 476 }
}
},
{
"type": "leafDirective",
"name": "use",
"attributes": { "component": "Second" },
"children": [],
"position": {
"start": { "line": 53, "column": 1, "offset": 478 },
"end": { "line": 53, "column": 26, "offset": 503 }
}
},
{
"type": "leafDirective",
"name": "id",
"attributes": { "id": "custom-name" },
"children": [],
"position": {
"start": { "line": 55, "column": 1, "offset": 505 },
"end": { "line": 55, "column": 19, "offset": 523 }
}
},
{
"type": "code",
"lang": "js",
"meta": null,
"value": "var x = 'y';",
"position": {
"start": { "line": 57, "column": 1, "offset": 525 },
"end": { "line": 59, "column": 4, "offset": 547 }
}
},
{
"type": "leafDirective",
"name": "use",
"attributes": { "component": "Script" },
"children": [],
"position": {
"start": { "line": 61, "column": 1, "offset": 549 },
"end": { "line": 61, "column": 26, "offset": 574 }
}
}
],
"position": {
"start": { "line": 1, "column": 1, "offset": 0 },
"end": { "line": 62, "column": 1, "offset": 575 }
}
}