add v2 parser tests, handle single curly tags

pull/1330/head
Rich-Harris 8 years ago
parent 0ebe5355e1
commit eebd47d02b

@ -66,6 +66,8 @@ export interface CompileOptions {
onerror?: (error: Error) => void;
onwarn?: (warning: Warning) => void;
parser?: 'v2';
}
export interface GenerateOptions {

@ -13,11 +13,13 @@ import error from '../utils/error';
interface ParserOptions {
filename?: string;
bind?: boolean;
parser?: 'v2';
}
type ParserState = (parser: Parser) => (ParserState | void);
export class Parser {
readonly v2: boolean;
readonly template: string;
readonly filename?: string;
@ -32,6 +34,8 @@ export class Parser {
allowBindings: boolean;
constructor(template: string, options: ParserOptions) {
this.v2 = options.parser === 'v2';
if (typeof template !== 'string') {
throw new TypeError('Template must be a string');
}

@ -8,7 +8,7 @@ export default function fragment(parser: Parser) {
return tag;
}
if (parser.match('{{')) {
if (parser.match(parser.v2 ? '{' : '{{')) {
return mustache;
}

@ -32,7 +32,7 @@ function trimWhitespace(block: Node, trimBefore: boolean, trimAfter: boolean) {
export default function mustache(parser: Parser) {
const start = parser.index;
parser.index += 2;
parser.index += parser.v2 ? 1 : 2;
parser.allowWhitespace();
@ -329,7 +329,7 @@ export default function mustache(parser: Parser) {
const expression = readExpression(parser);
parser.allowWhitespace();
parser.eat('}}', true);
parser.eat(parser.v2 ? '}' : '}}', true);
parser.current().children.push({
start,

@ -9,7 +9,7 @@ export default function text(parser: Parser) {
while (
parser.index < parser.template.length &&
!parser.match('<') &&
!parser.match('{{')
!parser.match(parser.v2 ? '{' : '{{')
) {
data += parser.template[parser.index++];
}

@ -2,7 +2,7 @@ import assert from 'assert';
import fs from 'fs';
import { svelte, tryToLoadJson } from '../helpers.js';
describe('parse', () => {
describe.only('parse', () => {
fs.readdirSync('test/parser/samples').forEach(dir => {
if (dir[0] === '.') return;
@ -20,19 +20,37 @@ describe('parse', () => {
.readFileSync(`test/parser/samples/${dir}/input.html`, 'utf-8')
.replace(/\s+$/, '');
const input_v2 = fs
.readFileSync(`test/parser/samples/${dir}/input-v2.html`, 'utf-8')
.replace(/\s+$/, '');
const options = tryToLoadJson(`test/parser/samples/${dir}/options.json`) || {};
try {
const actual = svelte.parse(input, options);
const expected = require(`./samples/${dir}/output.json`);
fs.writeFileSync(
`test/parser/samples/${dir}/_actual.json`,
JSON.stringify(actual, null, '\t')
);
const expected = require(`./samples/${dir}/output.json`);
assert.deepEqual(actual.html, expected.html);
assert.deepEqual(actual.css, expected.css);
assert.deepEqual(actual.js, expected.js);
// TODO remove v1 tests
const actual_v2 = svelte.parse(input_v2, Object.assign({ parser: 'v2' }, options));
const expected_v2 = require(`./samples/${dir}/output-v2.json`);
fs.writeFileSync(
`test/parser/samples/${dir}/_actual-v2.json`,
JSON.stringify(actual_v2, null, '\t')
);
assert.deepEqual(actual_v2.html, expected_v2.html);
assert.deepEqual(actual_v2.css, expected_v2.css);
assert.deepEqual(actual_v2.js, expected_v2.js);
} catch (err) {
if (err.name !== 'ParseError') throw err;

@ -0,0 +1,47 @@
{
"hash": "1eefngx",
"html": {
"start": 0,
"end": 38,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 38,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 37,
"type": "Action",
"name": "tooltip",
"expression": {
"type": "CallExpression",
"start": 20,
"end": 36,
"callee": {
"type": "Identifier",
"start": 20,
"end": 21,
"name": "t"
},
"arguments": [
{
"type": "Literal",
"start": 22,
"end": 35,
"value": "tooltip msg",
"raw": "'tooltip msg'"
}
]
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<input use:tooltip="t('tooltip msg')">

@ -0,0 +1,47 @@
{
"hash": 1937205193,
"html": {
"start": 0,
"end": 38,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 38,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 37,
"type": "Action",
"name": "tooltip",
"expression": {
"type": "CallExpression",
"start": 20,
"end": 36,
"callee": {
"type": "Identifier",
"start": 20,
"end": 21,
"name": "t"
},
"arguments": [
{
"type": "Literal",
"start": 22,
"end": 35,
"value": "tooltip msg",
"raw": "'tooltip msg'"
}
]
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,33 @@
{
"hash": "1vce0rr",
"html": {
"start": 0,
"end": 29,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 29,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 28,
"type": "Action",
"name": "tooltip",
"expression": {
"type": "Identifier",
"start": 20,
"end": 27,
"name": "message"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,33 @@
{
"hash": 1937205193,
"html": {
"start": 0,
"end": 29,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 29,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 28,
"type": "Action",
"name": "tooltip",
"expression": {
"type": "Identifier",
"start": 20,
"end": 27,
"name": "message"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,34 @@
{
"hash": "1pm9eh0",
"html": {
"start": 0,
"end": 35,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 35,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 34,
"type": "Action",
"name": "tooltip",
"expression": {
"type": "Literal",
"start": 20,
"end": 33,
"value": "tooltip msg",
"raw": "'tooltip msg'"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<input use:tooltip="'tooltip msg'">

@ -0,0 +1,34 @@
{
"hash": 1937205193,
"html": {
"start": 0,
"end": 35,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 35,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 34,
"type": "Action",
"name": "tooltip",
"expression": {
"type": "Literal",
"start": 20,
"end": 33,
"value": "tooltip msg",
"raw": "'tooltip msg'"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,28 @@
{
"hash": "1e3ix5",
"html": {
"start": 0,
"end": 21,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 21,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 20,
"type": "Action",
"name": "autofocus",
"expression": null
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,28 @@
{
"hash": 1937205193,
"html": {
"start": 0,
"end": 21,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 21,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 20,
"type": "Action",
"name": "autofocus",
"expression": null
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,35 @@
{
"hash": "7xolfv",
"html": {
"start": 0,
"end": 41,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 41,
"type": "Element",
"name": "textarea",
"attributes": [
{
"start": 10,
"end": 29,
"type": "Attribute",
"name": "readonly",
"value": [
{
"start": 19,
"end": 29,
"type": "Text",
"data": "{readonly}"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<textarea readonly={readonly}></textarea>

@ -0,0 +1,40 @@
{
"hash": 3179574701,
"html": {
"start": 0,
"end": 45,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 45,
"type": "Element",
"name": "textarea",
"attributes": [
{
"start": 10,
"end": 33,
"type": "Attribute",
"name": "readonly",
"value": [
{
"start": 20,
"end": 32,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 22,
"end": 30,
"name": "readonly"
}
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,35 @@
{
"hash": "l0cddf",
"html": {
"start": 0,
"end": 25,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 25,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 18,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 11,
"end": 18,
"type": "Text",
"data": "{class}"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,40 @@
{
"hash": 2788845841,
"html": {
"start": 0,
"end": 29,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 29,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 22,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 12,
"end": 21,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 14,
"end": 19,
"name": "class"
}
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,42 @@
{
"hash": "ehtsx6",
"html": {
"start": 0,
"end": 42,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 42,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 28,
"type": "Attribute",
"name": "style",
"value": [
{
"start": 12,
"end": 27,
"type": "Text",
"data": "color: {color};"
}
]
}
],
"children": [
{
"start": 29,
"end": 36,
"type": "Text",
"data": "{color}"
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<div style='color: {color};'>{color}</div>

@ -0,0 +1,64 @@
{
"hash": 804348386,
"html": {
"start": 0,
"end": 46,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 46,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 30,
"type": "Attribute",
"name": "style",
"value": [
{
"start": 12,
"end": 19,
"type": "Text",
"data": "color: "
},
{
"start": 19,
"end": 28,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 21,
"end": 26,
"name": "color"
}
},
{
"start": 28,
"end": 29,
"type": "Text",
"data": ";"
}
]
}
],
"children": [
{
"start": 31,
"end": 40,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 33,
"end": 38,
"name": "color"
}
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,35 @@
{
"hash": "pv50w6",
"html": {
"start": 0,
"end": 41,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 41,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 34,
"type": "Attribute",
"name": "data-foo",
"value": [
{
"start": 15,
"end": 33,
"type": "Text",
"data": "\"quoted\""
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<div data-foo='&quot;quoted&quot;'></div>

@ -0,0 +1,35 @@
{
"hash": 1563956934,
"html": {
"start": 0,
"end": 41,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 41,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 34,
"type": "Attribute",
"name": "data-foo",
"value": [
{
"start": 15,
"end": 33,
"type": "Text",
"data": "\"quoted\""
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,49 @@
{
"hash": "8dvm3u",
"html": {
"start": 0,
"end": 28,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 28,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 11,
"type": "Attribute",
"name": "id",
"value": [
{
"start": 9,
"end": 10,
"type": "Text",
"data": "x"
}
]
},
{
"start": 12,
"end": 21,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 19,
"end": 20,
"type": "Text",
"data": "y"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,49 @@
{
"hash": 507039402,
"html": {
"start": 0,
"end": 28,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 28,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 11,
"type": "Attribute",
"name": "id",
"value": [
{
"start": 9,
"end": 10,
"type": "Text",
"data": "x"
}
]
},
{
"start": 12,
"end": 21,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 19,
"end": 20,
"type": "Text",
"data": "y"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,40 @@
{
"hash": "s7nwuc",
"html": {
"start": 0,
"end": 10,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 10,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 8,
"type": "Attribute",
"name": "id",
"value": [
{
"type": "AttributeShorthand",
"start": 6,
"end": 8,
"expression": {
"type": "Identifier",
"start": 6,
"end": 8,
"name": "id"
}
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,40 @@
{
"hash": 1705925892,
"html": {
"start": 0,
"end": 10,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 10,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 8,
"type": "Attribute",
"name": "id",
"value": [
{
"type": "AttributeShorthand",
"start": 6,
"end": 8,
"expression": {
"type": "Identifier",
"start": 6,
"end": 8,
"name": "id"
}
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,28 @@
{
"hash": "a1b7fo",
"html": {
"start": 0,
"end": 30,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 30,
"type": "Element",
"name": "textarea",
"attributes": [
{
"start": 10,
"end": 18,
"type": "Attribute",
"name": "readonly",
"value": true
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,28 @@
{
"hash": 606864228,
"html": {
"start": 0,
"end": 30,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 30,
"type": "Element",
"name": "textarea",
"attributes": [
{
"start": 10,
"end": 18,
"type": "Attribute",
"name": "readonly",
"value": true
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,35 @@
{
"hash": "op11m5",
"html": {
"start": 0,
"end": 23,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 23,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 16,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 12,
"end": 15,
"type": "Text",
"data": "foo"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,35 @@
{
"hash": 1493227373,
"html": {
"start": 0,
"end": 23,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 23,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 16,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 12,
"end": 15,
"type": "Text",
"data": "foo"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<div class='foo' class='bar'></div>

@ -0,0 +1,35 @@
{
"hash": "1lozhxt",
"html": {
"start": 0,
"end": 21,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 21,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 14,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 11,
"end": 14,
"type": "Text",
"data": "foo"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,35 @@
{
"hash": 3488539025,
"html": {
"start": 0,
"end": 21,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 21,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 14,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 11,
"end": 14,
"type": "Text",
"data": "foo"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,81 @@
{
"hash": "1rt0tho",
"html": {
"start": 0,
"end": 149,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 21,
"type": "Text",
"data": "{#await thePromise}\n\t"
},
{
"start": 21,
"end": 38,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 24,
"end": 34,
"type": "Text",
"data": "loading..."
}
]
},
{
"start": 38,
"end": 57,
"type": "Text",
"data": "\n{:then theValue}\n\t"
},
{
"start": 57,
"end": 87,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 60,
"end": 83,
"type": "Text",
"data": "the value is {theValue}"
}
]
},
{
"start": 87,
"end": 107,
"type": "Text",
"data": "\n{:catch theError}\n\t"
},
{
"start": 107,
"end": 140,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 110,
"end": 136,
"type": "Text",
"data": "oh no! {theError.message}}"
}
]
},
{
"start": 140,
"end": 149,
"type": "Text",
"data": "\n{/await}"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,7 @@
{#await thePromise}
<p>loading...</p>
{:then theValue}
<p>the value is {theValue}</p>
{:catch theError}
<p>oh no! {theError.message}}</p>
{/await}

@ -0,0 +1,161 @@
{
"hash": 1040536517,
"html": {
"start": 0,
"end": 158,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 158,
"type": "AwaitBlock",
"expression": {
"type": "Identifier",
"start": 9,
"end": 19,
"name": "thePromise"
},
"value": "theValue",
"error": "theError",
"pending": {
"start": 21,
"end": 41,
"type": "PendingBlock",
"children": [
{
"start": 21,
"end": 23,
"type": "Text",
"data": "\n\t"
},
{
"start": 23,
"end": 40,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 26,
"end": 36,
"type": "Text",
"data": "loading..."
}
]
},
{
"start": 40,
"end": 41,
"type": "Text",
"data": "\n"
}
]
},
"then": {
"start": 41,
"end": 93,
"type": "ThenBlock",
"children": [
{
"start": 58,
"end": 60,
"type": "Text",
"data": "\n\t"
},
{
"start": 60,
"end": 92,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 63,
"end": 76,
"type": "Text",
"data": "the value is "
},
{
"start": 76,
"end": 88,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 78,
"end": 86,
"name": "theValue"
}
}
]
},
{
"start": 92,
"end": 93,
"type": "Text",
"data": "\n"
}
]
},
"catch": {
"start": 93,
"end": 148,
"type": "CatchBlock",
"children": [
{
"start": 111,
"end": 113,
"type": "Text",
"data": "\n\t"
},
{
"start": 113,
"end": 147,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 116,
"end": 123,
"type": "Text",
"data": "oh no! "
},
{
"start": 123,
"end": 143,
"type": "MustacheTag",
"expression": {
"type": "MemberExpression",
"start": 125,
"end": 141,
"object": {
"type": "Identifier",
"start": 125,
"end": 133,
"name": "theError"
},
"property": {
"type": "Identifier",
"start": 134,
"end": 141,
"name": "message"
},
"computed": false
}
}
]
},
{
"start": 147,
"end": 148,
"type": "Text",
"data": "\n"
}
]
}
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,33 @@
{
"hash": "1f31b7d",
"html": {
"start": 0,
"end": 18,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 18,
"type": "Element",
"name": "Widget",
"attributes": [
{
"start": 8,
"end": 16,
"type": "Binding",
"name": "foo",
"value": {
"type": "Identifier",
"start": 13,
"end": 16,
"name": "foo"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,33 @@
{
"hash": 3088875001,
"html": {
"start": 0,
"end": 18,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 18,
"type": "Element",
"name": "Widget",
"attributes": [
{
"start": 8,
"end": 16,
"type": "Binding",
"name": "foo",
"value": {
"type": "Identifier",
"start": 13,
"end": 16,
"name": "foo"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,33 @@
{
"hash": "w1d13d",
"html": {
"start": 0,
"end": 25,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 25,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 24,
"type": "Binding",
"name": "value",
"value": {
"type": "Identifier",
"start": 19,
"end": 23,
"name": "name"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<input bind:value='name'>

@ -0,0 +1,33 @@
{
"hash": 1937205193,
"html": {
"start": 0,
"end": 25,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 25,
"type": "Element",
"name": "input",
"attributes": [
{
"start": 7,
"end": 24,
"type": "Binding",
"name": "value",
"value": {
"type": "Identifier",
"start": 19,
"end": 23,
"name": "name"
}
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,18 @@
{
"hash": "1ihizni",
"html": {
"start": 0,
"end": 18,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 18,
"type": "Comment",
"data": " a comment "
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,18 @@
{
"hash": 3294612990,
"html": {
"start": 0,
"end": 18,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 18,
"type": "Comment",
"data": " a comment "
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,68 @@
{
"hash": "7yh2k2",
"html": {
"start": 0,
"end": 55,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 55,
"type": "Element",
"name": "svelte:component",
"attributes": [
{
"start": 18,
"end": 23,
"type": "Attribute",
"name": "{foo",
"value": true
},
{
"start": 23,
"end": 25,
"type": "Attribute",
"name": "?",
"value": true
},
{
"start": 25,
"end": 29,
"type": "Attribute",
"name": "Foo",
"value": true
},
{
"start": 29,
"end": 30,
"type": "Attribute",
"name": "",
"value": [
{
"type": "AttributeShorthand",
"start": 30,
"end": 30,
"expression": {
"type": "Identifier",
"start": 30,
"end": 30,
"name": ""
}
}
]
},
{
"start": 31,
"end": 35,
"type": "Attribute",
"name": "Bar}",
"value": true
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1 @@
<svelte:component {foo ? Foo : Bar}></svelte:component>

@ -0,0 +1,43 @@
{
"hash": 410218696,
"html": {
"start": 0,
"end": 43,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 43,
"type": "Element",
"name": ":Component",
"attributes": [],
"children": [],
"expression": {
"type": "ConditionalExpression",
"start": 13,
"end": 28,
"test": {
"type": "Identifier",
"start": 13,
"end": 16,
"name": "foo"
},
"consequent": {
"type": "Identifier",
"start": 19,
"end": 22,
"name": "Foo"
},
"alternate": {
"type": "Identifier",
"start": 25,
"end": 28,
"name": "Bar"
}
}
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,27 @@
{
"hash": "134kmw9",
"html": {
"start": 0,
"end": 24,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 24,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 3,
"end": 20,
"type": "Text",
"data": "Hello & World"
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,27 @@
{
"hash": 2365862121,
"html": {
"start": 0,
"end": 24,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 24,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 3,
"end": 20,
"type": "Text",
"data": "Hello & World"
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,18 @@
{
"hash": "2lbrq0",
"html": {
"start": 0,
"end": 17,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 17,
"type": "Text",
"data": "Hello & World"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,18 @@
{
"hash": 156753432,
"html": {
"start": 0,
"end": 17,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 17,
"type": "Text",
"data": "Hello & World"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,96 @@
{
"hash": "i9aush",
"html": {
"start": 0,
"end": 14,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 14,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 12,
"type": "Ref",
"name": "foo"
}
],
"children": []
},
{
"start": 14,
"end": 16,
"type": "Text",
"data": "\n\n"
}
]
},
"css": {
"start": 16,
"end": 60,
"attributes": [],
"children": [
{
"type": "Rule",
"selector": {
"type": "SelectorList",
"children": [
{
"type": "Selector",
"children": [
{
"type": "RefSelector",
"start": 25,
"end": 32,
"name": "foo"
}
],
"start": 25,
"end": 32
}
],
"start": 25,
"end": 32
},
"block": {
"type": "Block",
"children": [
{
"type": "Declaration",
"important": false,
"property": "color",
"value": {
"type": "Value",
"children": [
{
"type": "Identifier",
"name": "red",
"start": 44,
"end": 47
}
],
"start": 43,
"end": 47
},
"start": 37,
"end": 47
}
],
"start": 33,
"end": 51
},
"start": 25,
"end": 51
}
],
"content": {
"start": 23,
"end": 52,
"styles": "\n\tref:foo {\n\t\tcolor: red;\n\t}\n"
}
},
"js": null
}

@ -0,0 +1,7 @@
<div ref:foo/>
<style>
ref:foo {
color: red;
}
</style>

@ -0,0 +1,96 @@
{
"hash": 1104014177,
"html": {
"start": 0,
"end": 14,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 14,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 12,
"type": "Ref",
"name": "foo"
}
],
"children": []
},
{
"start": 14,
"end": 16,
"type": "Text",
"data": "\n\n"
}
]
},
"css": {
"start": 16,
"end": 60,
"attributes": [],
"children": [
{
"type": "Rule",
"selector": {
"type": "SelectorList",
"children": [
{
"type": "Selector",
"children": [
{
"type": "RefSelector",
"start": 25,
"end": 32,
"name": "foo"
}
],
"start": 25,
"end": 32
}
],
"start": 25,
"end": 32
},
"block": {
"type": "Block",
"children": [
{
"type": "Declaration",
"important": false,
"property": "color",
"value": {
"type": "Value",
"children": [
{
"type": "Identifier",
"name": "red",
"start": 44,
"end": 47
}
],
"start": 43,
"end": 47
},
"start": 37,
"end": 47
}
],
"start": 33,
"end": 51
},
"start": 25,
"end": 51
}
],
"content": {
"start": 23,
"end": 52,
"styles": "\n\tref:foo {\n\t\tcolor: red;\n\t}\n"
}
},
"js": null
}

@ -0,0 +1,96 @@
{
"hash": "iz4x8b",
"html": {
"start": 0,
"end": 14,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 14,
"type": "Element",
"name": "div",
"attributes": [],
"children": [
{
"start": 5,
"end": 8,
"type": "Text",
"data": "foo"
}
]
},
{
"start": 14,
"end": 16,
"type": "Text",
"data": "\n\n"
}
]
},
"css": {
"start": 16,
"end": 56,
"attributes": [],
"children": [
{
"type": "Rule",
"selector": {
"type": "SelectorList",
"children": [
{
"type": "Selector",
"children": [
{
"type": "TypeSelector",
"name": "div",
"start": 25,
"end": 28
}
],
"start": 25,
"end": 28
}
],
"start": 25,
"end": 28
},
"block": {
"type": "Block",
"children": [
{
"type": "Declaration",
"important": false,
"property": "color",
"value": {
"type": "Value",
"children": [
{
"type": "Identifier",
"name": "red",
"start": 40,
"end": 43
}
],
"start": 39,
"end": 43
},
"start": 33,
"end": 43
}
],
"start": 29,
"end": 47
},
"start": 25,
"end": 47
}
],
"content": {
"start": 23,
"end": 48,
"styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n"
}
},
"js": null
}

@ -0,0 +1,7 @@
<div>foo</div>
<style>
div {
color: red;
}
</style>

@ -0,0 +1,96 @@
{
"hash": 1147407419,
"html": {
"start": 0,
"end": 14,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 14,
"type": "Element",
"name": "div",
"attributes": [],
"children": [
{
"start": 5,
"end": 8,
"type": "Text",
"data": "foo"
}
]
},
{
"start": 14,
"end": 16,
"type": "Text",
"data": "\n\n"
}
]
},
"css": {
"start": 16,
"end": 56,
"attributes": [],
"children": [
{
"type": "Rule",
"selector": {
"type": "SelectorList",
"children": [
{
"type": "Selector",
"children": [
{
"type": "TypeSelector",
"name": "div",
"start": 25,
"end": 28
}
],
"start": 25,
"end": 28
}
],
"start": 25,
"end": 28
},
"block": {
"type": "Block",
"children": [
{
"type": "Declaration",
"important": false,
"property": "color",
"value": {
"type": "Value",
"children": [
{
"type": "Identifier",
"name": "red",
"start": 40,
"end": 43
}
],
"start": 39,
"end": 43
},
"start": 33,
"end": 43
}
],
"start": 29,
"end": 47
},
"start": 25,
"end": 47
}
],
"content": {
"start": 23,
"end": 48,
"styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n"
}
},
"js": null
}

@ -0,0 +1,182 @@
{
"hash": "uvuf1h",
"html": {
"start": null,
"end": null,
"type": "Fragment",
"children": []
},
"css": null,
"js": {
"start": 0,
"end": 131,
"attributes": [],
"content": {
"type": "Program",
"start": 8,
"end": 122,
"body": [
{
"type": "ExportDefaultDeclaration",
"start": 10,
"end": 121,
"declaration": {
"type": "ObjectExpression",
"start": 25,
"end": 121,
"properties": [
{
"type": "Property",
"start": 29,
"end": 118,
"method": true,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 29,
"end": 37,
"name": "oncreate"
},
"kind": "init",
"value": {
"type": "FunctionExpression",
"start": 37,
"end": 118,
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 40,
"end": 118,
"body": [
{
"type": "ExpressionStatement",
"start": 45,
"end": 114,
"expression": {
"type": "CallExpression",
"start": 45,
"end": 113,
"callee": {
"type": "MemberExpression",
"start": 45,
"end": 68,
"object": {
"type": "CallExpression",
"start": 45,
"end": 63,
"callee": {
"type": "Import",
"start": 45,
"end": 51
},
"arguments": [
{
"type": "Literal",
"start": 52,
"end": 62,
"value": "./foo.js",
"raw": "'./foo.js'"
}
]
},
"property": {
"type": "Identifier",
"start": 64,
"end": 68,
"name": "then"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 69,
"end": 112,
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 69,
"end": 72,
"name": "foo"
}
],
"body": {
"type": "BlockStatement",
"start": 76,
"end": 112,
"body": [
{
"type": "ExpressionStatement",
"start": 82,
"end": 107,
"expression": {
"type": "CallExpression",
"start": 82,
"end": 106,
"callee": {
"type": "MemberExpression",
"start": 82,
"end": 93,
"object": {
"type": "Identifier",
"start": 82,
"end": 89,
"name": "console"
},
"property": {
"type": "Identifier",
"start": 90,
"end": 93,
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 94,
"end": 105,
"object": {
"type": "Identifier",
"start": 94,
"end": 97,
"name": "foo"
},
"property": {
"type": "Identifier",
"start": 98,
"end": 105,
"name": "default"
},
"computed": false
}
]
}
}
]
}
}
]
}
}
]
}
}
}
]
}
}
],
"sourceType": "module"
}
}
}

@ -0,0 +1,9 @@
<script>
export default {
oncreate() {
import('./foo.js').then(foo => {
console.log(foo.default);
});
}
}
</script>

@ -0,0 +1,182 @@
{
"hash": 1867472549,
"html": {
"start": null,
"end": null,
"type": "Fragment",
"children": []
},
"css": null,
"js": {
"start": 0,
"end": 131,
"attributes": [],
"content": {
"type": "Program",
"start": 8,
"end": 122,
"body": [
{
"type": "ExportDefaultDeclaration",
"start": 10,
"end": 121,
"declaration": {
"type": "ObjectExpression",
"start": 25,
"end": 121,
"properties": [
{
"type": "Property",
"start": 29,
"end": 118,
"method": true,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 29,
"end": 37,
"name": "oncreate"
},
"kind": "init",
"value": {
"type": "FunctionExpression",
"start": 37,
"end": 118,
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 40,
"end": 118,
"body": [
{
"type": "ExpressionStatement",
"start": 45,
"end": 114,
"expression": {
"type": "CallExpression",
"start": 45,
"end": 113,
"callee": {
"type": "MemberExpression",
"start": 45,
"end": 68,
"object": {
"type": "CallExpression",
"start": 45,
"end": 63,
"callee": {
"type": "Import",
"start": 45,
"end": 51
},
"arguments": [
{
"type": "Literal",
"start": 52,
"end": 62,
"value": "./foo.js",
"raw": "'./foo.js'"
}
]
},
"property": {
"type": "Identifier",
"start": 64,
"end": 68,
"name": "then"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 69,
"end": 112,
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 69,
"end": 72,
"name": "foo"
}
],
"body": {
"type": "BlockStatement",
"start": 76,
"end": 112,
"body": [
{
"type": "ExpressionStatement",
"start": 82,
"end": 107,
"expression": {
"type": "CallExpression",
"start": 82,
"end": 106,
"callee": {
"type": "MemberExpression",
"start": 82,
"end": 93,
"object": {
"type": "Identifier",
"start": 82,
"end": 89,
"name": "console"
},
"property": {
"type": "Identifier",
"start": 90,
"end": 93,
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 94,
"end": 105,
"object": {
"type": "Identifier",
"start": 94,
"end": 97,
"name": "foo"
},
"property": {
"type": "Identifier",
"start": 98,
"end": 105,
"name": "default"
},
"computed": false
}
]
}
}
]
}
}
]
}
}
]
}
}
}
]
}
}
],
"sourceType": "module"
}
}
}

@ -0,0 +1,39 @@
{
"hash": "gtdm5e",
"html": {
"start": 0,
"end": 62,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 33,
"type": "Text",
"data": "{#each animals as [key, value]}\n\t"
},
{
"start": 33,
"end": 54,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 36,
"end": 50,
"type": "Text",
"data": "{key}: {value}"
}
]
},
{
"start": 54,
"end": 62,
"type": "Text",
"data": "\n{/each}"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,3 @@
{#each animals as [key, value]}
<p>{key}: {value}</p>
{/each}

@ -0,0 +1,67 @@
{
"hash": 2621498076,
"html": {
"start": 0,
"end": 70,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 70,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 8,
"end": 15,
"name": "animals"
},
"children": [
{
"start": 35,
"end": 60,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 38,
"end": 45,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 40,
"end": 43,
"name": "key"
}
},
{
"start": 45,
"end": 47,
"type": "Text",
"data": ": "
},
{
"start": 47,
"end": 56,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 49,
"end": 54,
"name": "value"
}
}
]
}
],
"destructuredContexts": [
"key",
"value"
],
"context": "key_value"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,60 @@
{
"hash": "ljl07n",
"html": {
"start": 0,
"end": 77,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 27,
"type": "Text",
"data": "{#each animals as animal}\n\t"
},
{
"start": 27,
"end": 42,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 30,
"end": 38,
"type": "Text",
"data": "{animal}"
}
]
},
{
"start": 42,
"end": 52,
"type": "Text",
"data": "\n{:else}\n\t"
},
{
"start": 52,
"end": 69,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 55,
"end": 65,
"type": "Text",
"data": "no animals"
}
]
},
{
"start": 69,
"end": 77,
"type": "Text",
"data": "\n{/each}"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,5 @@
{#each animals as animal}
<p>{animal}</p>
{:else}
<p>no animals</p>
{/each}

@ -0,0 +1,68 @@
{
"hash": 3238289871,
"html": {
"start": 0,
"end": 84,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 84,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 8,
"end": 15,
"name": "animals"
},
"children": [
{
"start": 29,
"end": 46,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 32,
"end": 42,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 34,
"end": 40,
"name": "animal"
}
}
]
}
],
"context": "animal",
"else": {
"start": 55,
"end": 75,
"type": "ElseBlock",
"children": [
{
"start": 57,
"end": 74,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 60,
"end": 70,
"type": "Text",
"data": "no animals"
}
]
}
]
}
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,39 @@
{
"hash": "1143n2g",
"html": {
"start": 0,
"end": 58,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 30,
"type": "Text",
"data": "{#each animals as animal, i}\n\t"
},
{
"start": 30,
"end": 50,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 33,
"end": 46,
"type": "Text",
"data": "{i}: {animal}"
}
]
},
{
"start": 50,
"end": 58,
"type": "Text",
"data": "\n{/each}"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,3 @@
{#each animals as animal, i}
<p>{i}: {animal}</p>
{/each}

@ -0,0 +1,64 @@
{
"hash": 2841674990,
"html": {
"start": 0,
"end": 66,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 66,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 8,
"end": 15,
"name": "animals"
},
"children": [
{
"start": 32,
"end": 56,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 35,
"end": 40,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 37,
"end": 38,
"name": "i"
}
},
{
"start": 40,
"end": 42,
"type": "Text",
"data": ": "
},
{
"start": 42,
"end": 52,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 44,
"end": 50,
"name": "animal"
}
}
]
}
],
"context": "animal",
"index": "i"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,39 @@
{
"hash": "3sm0ec",
"html": {
"start": 0,
"end": 56,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 35,
"type": "Text",
"data": "{#each todos as todo key todo.id}\n\t"
},
{
"start": 35,
"end": 48,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 38,
"end": 44,
"type": "Text",
"data": "{todo}"
}
]
},
{
"start": 48,
"end": 56,
"type": "Text",
"data": "\n{/each}"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,3 @@
{#each todos as todo key todo.id}
<p>{todo}</p>
{/each}

@ -0,0 +1,47 @@
{
"hash": 2025411181,
"html": {
"start": 0,
"end": 54,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 54,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 8,
"end": 13,
"name": "todos"
},
"children": [
{
"start": 29,
"end": 44,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 32,
"end": 40,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 34,
"end": 38,
"name": "todo"
}
}
]
}
],
"context": "todo",
"key": "id"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,39 @@
{
"hash": "mzeq0s",
"html": {
"start": 0,
"end": 50,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 27,
"type": "Text",
"data": "{#each animals as animal}\n\t"
},
{
"start": 27,
"end": 42,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 30,
"end": 38,
"type": "Text",
"data": "{animal}"
}
]
},
{
"start": 42,
"end": 50,
"type": "Text",
"data": "\n{/each}"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,3 @@
{#each animals as animal}
<p>{animal}</p>
{/each}

@ -0,0 +1,46 @@
{
"hash": 220340986,
"html": {
"start": 0,
"end": 56,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 56,
"type": "EachBlock",
"expression": {
"type": "Identifier",
"start": 8,
"end": 15,
"name": "animals"
},
"children": [
{
"start": 29,
"end": 46,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 32,
"end": 42,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 34,
"end": 40,
"name": "animal"
}
}
]
}
],
"context": "animal"
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,44 @@
{
"hash": "9fs56",
"html": {
"start": 0,
"end": 22,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 22,
"type": "Element",
"name": "h1",
"attributes": [],
"children": [
{
"start": 4,
"end": 10,
"type": "Text",
"data": "hello "
},
{
"start": 10,
"end": 16,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 11,
"end": 15,
"name": "name"
}
},
{
"start": 16,
"end": 17,
"type": "Text",
"data": "!"
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,44 @@
{
"hash": 1265376132,
"html": {
"start": 0,
"end": 22,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 22,
"type": "Element",
"name": "h1",
"attributes": [],
"children": [
{
"start": 4,
"end": 10,
"type": "Text",
"data": "hello "
},
{
"start": 10,
"end": 16,
"type": "MustacheTag",
"expression": {
"type": "Identifier",
"start": 11,
"end": 15,
"name": "name"
}
},
{
"start": 16,
"end": 17,
"type": "Text",
"data": "!"
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,27 @@
{
"hash": "a3xqjm",
"html": {
"start": 0,
"end": 17,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 17,
"type": "Element",
"name": "span",
"attributes": [],
"children": [
{
"start": 6,
"end": 10,
"type": "Text",
"data": "test"
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,27 @@
{
"hash": 611274658,
"html": {
"start": 0,
"end": 17,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 17,
"type": "Element",
"name": "span",
"attributes": [],
"children": [
{
"start": 6,
"end": 10,
"type": "Text",
"data": "test"
}
]
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,28 @@
{
"hash": "dni3s5",
"html": {
"start": 0,
"end": 15,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 15,
"type": "Element",
"name": "!doctype",
"attributes": [
{
"start": 10,
"end": 14,
"type": "Attribute",
"name": "html",
"value": true
}
],
"children": []
}
]
},
"css": null,
"js": null
}

@ -0,0 +1,28 @@
{
"hash": 825536165,
"html": {
"start": 0,
"end": 15,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 15,
"type": "Element",
"name": "!doctype",
"attributes": [
{
"start": 10,
"end": 14,
"type": "Attribute",
"name": "html",
"value": true
}
],
"children": []
}
]
},
"css": null,
"js": null
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save