From eb40c24b55bdbf335bc926b06ba24c6532d98894 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sat, 19 Jun 2021 14:22:09 +0900 Subject: [PATCH] Change HTMLText token to split into blanks and words. --- src/parser/converts/text.ts | 30 +- .../ast/blog/write-less-code01-output.json | 80 +- .../parser/ast/components02-output.json | 22 +- .../parser/ast/components03-output.json | 44 +- .../02-output.json | 192 +- .../02-attributes-and-props/01-output.json | 76 +- .../02-attributes-and-props/03-output.json | 22 +- .../02-attributes-and-props/05-output.json | 368 ++- .../03-text-expressions/02-output.json | 102 +- .../04-comments/01-output.json | 40 +- .../template-syntax/05-hash-if/02-output.json | 112 +- .../template-syntax/05-hash-if/03-output.json | 120 +- .../06-hash-each/02-output.json | 80 +- .../06-hash-each/03-output.json | 62 +- .../06-hash-each/04-output.json | 102 +- .../06-hash-each/05-output.json | 62 +- .../06-hash-each/06-output.json | 76 +- .../07-hash-await/02-output.json | 372 ++- .../07-hash-await/03-output.json | 278 +- .../07-hash-await/04-output.json | 94 +- .../07-hash-await/05-output.json | 94 +- .../10-at-debug/02-output.json | 22 +- .../01-on-eventname/02-output.json | 40 +- .../01-on-eventname/03-output.json | 40 +- .../01-on-eventname/05-output.json | 292 +- .../01-on-eventname/06-output.json | 40 +- .../02-bind-property/05-output.json | 116 +- .../02-bind-property/07-output.json | 80 +- .../02-bind-property/08-output.json | 40 +- .../03-bind-group/02-output.json | 80 +- .../07-transition-fn/02-output.json | 148 +- .../07-transition-fn/03-output.json | 256 +- .../07-transition-fn/04-output.json | 76 +- .../07-transition-fn/05-output.json | 328 +- .../07-transition-fn/05-ts-output.json | 328 +- .../07-transition-fn/06-output.json | 148 +- .../07-transition-fn/07-output.json | 620 +++- .../08-in-fn-out-fn/02-output.json | 148 +- .../03-bind-this/02-output.json | 112 +- .../template-syntax/13-slot/00/02-output.json | 1426 ++++++-- .../13-slot/01-slot-name-name/01-output.json | 444 ++- .../13-slot/01-slot-name-name/02-output.json | 520 ++- .../13-slot/02-$$slots/01-output.json | 76 +- .../03-slot-let-name-value/02-output.json | 148 +- .../14-svelte-self/01-output.json | 58 +- .../20-svelte-fragment/01-output.json | 520 ++- .../ast/hello/hello-world01-output.json | 22 +- .../ast/hello/hello-world02-output.json | 40 +- .../ast/hello/hello-world03-output.json | 112 +- .../ast/hello/hello-world04-output.json | 40 +- .../ast/hello/hello-world05-output.json | 448 ++- .../parser/ast/kit-demo-home-output.json | 228 +- tests/fixtures/parser/ast/label01-output.json | 192 +- .../parser/ast/let-directive01-output.json | 62 +- .../parser/ast/store-bindings-output.json | 112 +- .../parser/ast/ts-promise01-output.json | 134 +- .../parser/ast/tutorial/actions-output.json | 80 +- .../ast/tutorial/adding-data-output.json | 22 +- .../adding-parameters-to-actions-output.json | 300 +- ...ding-parameters-to-transitions-output.json | 188 +- .../parser/ast/tutorial/animate-output.json | 148 +- .../tutorial/auto-subscriptions01-output.json | 94 +- .../ast/tutorial/await-blocks-output.json | 514 ++- .../parser/ast/tutorial/basics-output.json | 40 +- .../ast/tutorial/checkbox-inputs-output.json | 1402 +++++++- .../ast/tutorial/class-shorthand-output.json | 120 +- .../tutorial/component-bindings01-output.json | 22 +- .../tutorial/component-events02-output.json | 148 +- .../ast/tutorial/congratulations-output.json | 156 +- .../ast/tutorial/context-api01-output.json | 528 ++- .../custom-css-transitions01-output.json | 40 +- .../custom-css-transitions02-output.json | 40 +- .../custom-js-transitions-output.json | 368 ++- .../ast/tutorial/custom-stores-output.json | 94 +- .../parser/ast/tutorial/debug01-output.json | 22 +- .../parser/ast/tutorial/debug02-output.json | 22 +- .../tutorial/declaring-props02-output.json | 94 +- .../ast/tutorial/default-values02-output.json | 94 +- .../tutorial/deferred-transitions-output.json | 148 +- .../ast/tutorial/derived-stores-output.json | 314 +- .../ast/tutorial/dimensions-output.json | 102 +- .../dom-event-forwarding02-output.json | 76 +- .../ast/tutorial/dom-events-output.json | 188 +- .../tutorial/dynamic-attributes-output.json | 152 +- .../tutorial/each-block-bindings-output.json | 322 +- .../ast/tutorial/each-blocks01-output.json | 148 +- .../ast/tutorial/each-blocks02-output.json | 170 +- .../ast/tutorial/else-blocks-output.json | 152 +- .../ast/tutorial/else-if-blocks01-output.json | 426 ++- .../ast/tutorial/else-if-blocks02-output.json | 426 ++- .../tutorial/event-forwarding02-output.json | 148 +- .../ast/tutorial/event-modifiers-output.json | 76 +- .../ast/tutorial/group-inputs-output.json | 816 ++++- .../parser/ast/tutorial/if-blocks-output.json | 152 +- .../ast/tutorial/in-and-out-output.json | 188 +- .../ast/tutorial/inline-handlers-output.json | 188 +- .../tutorial/keyed-each-blocks-output.json | 112 +- .../tutorial/local-transitions-output.json | 76 +- .../ast/tutorial/media-elements-output.json | 424 ++- .../ast/tutorial/module-exports01-output.json | 2352 ++++++++++++-- .../ast/tutorial/module-exports02-output.json | 112 +- .../multiple-select-bindings-output.json | 810 ++++- .../ast/tutorial/named-slots01-output.json | 210 +- .../ast/tutorial/named-slots02-output.json | 120 +- .../tutorial/nested-components01-output.json | 112 +- .../tutorial/nested-components02-output.json | 112 +- .../ast/tutorial/numeric-inputs01-output.json | 80 +- .../ast/tutorial/numeric-inputs02-output.json | 80 +- .../parser/ast/tutorial/ondestroy-output.json | 220 +- .../parser/ast/tutorial/onmount-output.json | 40 +- .../ast/tutorial/optional-slots01-output.json | 380 ++- .../ast/tutorial/optional-slots03-output.json | 58 +- .../tutorial/reactive-assignments-output.json | 40 +- .../reactive-declarations-output.json | 116 +- .../tutorial/reactive-statements-output.json | 40 +- .../ast/tutorial/readable-stores-output.json | 94 +- .../ast/tutorial/select-bindings-output.json | 138 +- .../ast/tutorial/sharing-code01-output.json | 2860 +++++++++++++---- .../ast/tutorial/sharing-code02-output.json | 112 +- .../ast/tutorial/slot-fallbacks01-output.json | 256 +- .../ast/tutorial/slot-fallbacks02-output.json | 112 +- .../ast/tutorial/slot-props01-output.json | 224 +- .../ast/tutorial/slot-props03-output.json | 224 +- .../parser/ast/tutorial/slots01-output.json | 440 ++- .../ast/tutorial/spread-props02-output.json | 384 ++- .../parser/ast/tutorial/spring-output.json | 192 +- .../parser/ast/tutorial/styling01-output.json | 112 +- .../parser/ast/tutorial/styling02-output.json | 112 +- .../ast/tutorial/svelte-body-output.json | 220 +- .../ast/tutorial/svelte-fragment-output.json | 224 +- .../ast/tutorial/svelte-head-output.json | 40 +- .../ast/tutorial/svelte-self02-output.json | 40 +- .../svelte-window-bindings-output.json | 348 +- .../ast/tutorial/svelte-window-output.json | 260 +- .../ast/tutorial/text-inputs01-output.json | 22 +- .../ast/tutorial/text-inputs02-output.json | 22 +- .../tutorial/transition-events-output.json | 210 +- .../ast/tutorial/transition-output.json | 188 +- .../parser/ast/tutorial/tweened-output.json | 200 +- .../updating-arrays-and-objects-output.json | 152 +- .../tutorial/writable-stores01-output.json | 94 +- .../tutorial/writable-stores02-output.json | 40 +- .../tutorial/writable-stores03-output.json | 40 +- .../tutorial/writable-stores04-output.json | 40 +- 144 files changed, 29583 insertions(+), 1963 deletions(-) diff --git a/src/parser/converts/text.ts b/src/parser/converts/text.ts index 507325c0..5b6355c6 100644 --- a/src/parser/converts/text.ts +++ b/src/parser/converts/text.ts @@ -13,7 +13,20 @@ export function convertText( parent, ...ctx.getConvertLocation(node), } - ctx.addToken("HTMLText", node) + let start = node.start + let word = false + for (let index = node.start; index < node.end; index++) { + if (word !== Boolean(ctx.code[index].trim())) { + if (start < index) { + ctx.addToken("HTMLText", { start, end: index }) + } + word = !word + start = index + } + } + if (start < node.end) { + ctx.addToken("HTMLText", { start, end: node.end }) + } return text } @@ -29,6 +42,19 @@ export function convertTextToLiteral( parent, ...ctx.getConvertLocation(node), } - ctx.addToken("HTMLText", node) + let start = node.start + let word = false + for (let index = node.start; index < node.end; index++) { + if (word !== Boolean(ctx.code[index].trim())) { + if (start < index) { + ctx.addToken("HTMLText", { start, end: index }) + } + word = !word + start = index + } + } + if (start < node.end) { + ctx.addToken("HTMLText", { start, end: node.end }) + } return text } diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-output.json b/tests/fixtures/parser/ast/blog/write-less-code01-output.json index 79d20617..b1dac684 100644 --- a/tests/fixtures/parser/ast/blog/write-less-code01-output.json +++ b/tests/fixtures/parser/ast/blog/write-less-code01-output.json @@ -1916,16 +1916,52 @@ }, { "type": "HTMLText", - "value": " + ", + "value": " ", "range": [ 125, - 128 + 126 ], "loc": { "start": { "line": 9, "column": 6 }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "+", + "range": [ + 126, + 127 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, "end": { "line": 9, "column": 9 @@ -1988,16 +2024,52 @@ }, { "type": "HTMLText", - "value": " = ", + "value": " ", "range": [ 131, - 134 + 132 ], "loc": { "start": { "line": 9, "column": 12 }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "=", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, "end": { "line": 9, "column": 15 diff --git a/tests/fixtures/parser/ast/components02-output.json b/tests/fixtures/parser/ast/components02-output.json index 4068ec53..348f532d 100644 --- a/tests/fixtures/parser/ast/components02-output.json +++ b/tests/fixtures/parser/ast/components02-output.json @@ -642,16 +642,34 @@ }, { "type": "HTMLText", - "value": "\n\tcontents", + "value": "\n\t", "range": [ 82, - 92 + 84 ], "loc": { "start": { "line": 5, "column": 13 }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "contents", + "range": [ + 84, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, "end": { "line": 6, "column": 9 diff --git a/tests/fixtures/parser/ast/components03-output.json b/tests/fixtures/parser/ast/components03-output.json index df1d65fa..dff10179 100644 --- a/tests/fixtures/parser/ast/components03-output.json +++ b/tests/fixtures/parser/ast/components03-output.json @@ -985,16 +985,34 @@ }, { "type": "HTMLText", - "value": "\n\tcontents", + "value": "\n\t", "range": [ 95, - 105 + 97 ], "loc": { "start": { "line": 5, "column": 26 }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "contents", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, "end": { "line": 6, "column": 9 @@ -1327,16 +1345,34 @@ }, { "type": "HTMLText", - "value": "\n\tcontents", + "value": "\n\t", "range": [ 177, - 187 + 179 ], "loc": { "start": { "line": 8, "column": 32 }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "contents", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, "end": { "line": 9, "column": 9 diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-output.json index 7e035a9c..d35ede33 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-output.json @@ -1706,16 +1706,52 @@ }, { "type": "HTMLText", - "value": "\n\nTotal: ", + "value": "\n\n", "range": [ 126, - 135 + 128 ], "loc": { "start": { "line": 10, "column": 9 }, + "end": { + "line": 12, + "column": 0 + } + } + }, + { + "type": "HTMLText", + "value": "Total:", + "range": [ + 128, + 134 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, "end": { "line": 12, "column": 7 @@ -2048,16 +2084,88 @@ }, { "type": "HTMLText", - "value": "\n\tIncrement X\n", + "value": "\n\t", "range": [ 172, - 186 + 174 ], "loc": { "start": { "line": 13, "column": 29 }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Increment", + "range": [ + 174, + 183 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 183, + 184 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "X", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, "end": { "line": 15, "column": 0 @@ -2408,16 +2516,88 @@ }, { "type": "HTMLText", - "value": "\n\tIncrement Y\n", + "value": "\n\t", "range": [ 226, - 240 + 228 ], "loc": { "start": { "line": 17, "column": 29 }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Increment", + "range": [ + 228, + 237 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 237, + 238 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "Y", + "range": [ + 238, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 239, + 240 + ], + "loc": { + "start": { + "line": 18, + "column": 12 + }, "end": { "line": 19, "column": 0 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-output.json index 505798ec..aa1b05a2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-output.json @@ -538,16 +538,88 @@ }, { "type": "HTMLText", - "value": "can't touch this", + "value": "can't", "range": [ 36, - 52 + 41 ], "loc": { "start": { "line": 2, "column": 18 }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "touch", + "range": [ + 42, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "this", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, "end": { "line": 2, "column": 34 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-output.json index 98ab8578..5416010c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-output.json @@ -426,16 +426,34 @@ }, { "type": "HTMLText", - "value": "page ", + "value": "page", "range": [ 19, - 24 + 23 ], "loc": { "start": { "line": 1, "column": 19 }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, "end": { "line": 1, "column": 24 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-output.json index 0e7b6031..12a18abe 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-output.json @@ -562,16 +562,196 @@ }, { "type": "HTMLText", - "value": "This input field is not required", + "value": "This", "range": [ 37, - 69 + 41 ], "loc": { "start": { "line": 1, "column": 37 }, + "end": { + "line": 1, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "input", + "range": [ + 42, + 47 + ], + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 47 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 48 + } + } + }, + { + "type": "HTMLText", + "value": "field", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 53 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 53 + }, + "end": { + "line": 1, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 54, + 56 + ], + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 56 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 56 + }, + "end": { + "line": 1, + "column": 57 + } + } + }, + { + "type": "HTMLText", + "value": "not", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 1, + "column": 57 + }, + "end": { + "line": 1, + "column": 60 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 1, + "column": 60 + }, + "end": { + "line": 1, + "column": 61 + } + } + }, + { + "type": "HTMLText", + "value": "required", + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 1, + "column": 61 + }, "end": { "line": 1, "column": 69 @@ -778,16 +958,196 @@ }, { "type": "HTMLText", - "value": "This div has no title attribute", + "value": "This", "range": [ 90, - 121 + 94 ], "loc": { "start": { "line": 2, "column": 18 }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "div", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "has", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "no", + "range": [ + 103, + 105 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "title", + "range": [ + 106, + 111 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + { + "type": "HTMLText", + "value": "attribute", + "range": [ + 112, + 121 + ], + "loc": { + "start": { + "line": 2, + "column": 40 + }, "end": { "line": 2, "column": 49 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-output.json index d44d8daa..5229205c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-output.json @@ -497,16 +497,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 4, - 10 + 9 ], "loc": { "start": { "line": 1, "column": 4 }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, "end": { "line": 1, "column": 10 @@ -785,16 +803,52 @@ }, { "type": "HTMLText", - "value": " + ", + "value": " ", "range": [ 29, - 32 + 30 ], "loc": { "start": { "line": 2, "column": 6 }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "+", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, "end": { "line": 2, "column": 9 @@ -857,16 +911,52 @@ }, { "type": "HTMLText", - "value": " = ", + "value": " ", "range": [ 35, - 38 + 36 ], "loc": { "start": { "line": 2, "column": 12 }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, "end": { "line": 2, "column": 15 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-output.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-output.json index 8d45ab3c..a9ffc25f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-output.json @@ -225,16 +225,52 @@ }, { "type": "HTMLText", - "value": "Hello world", + "value": "Hello", "range": [ 32, - 43 + 37 ], "loc": { "start": { "line": 2, "column": 4 }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "world", + "range": [ + 38, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, "end": { "line": 2, "column": 15 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-output.json index c2c904d6..40ee8ba9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-output.json @@ -337,16 +337,124 @@ }, { "type": "HTMLText", - "value": "what was the question?", + "value": "what", "range": [ 24, - 46 + 28 ], "loc": { "start": { "line": 2, "column": 4 }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "was", + "range": [ + 29, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 33, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "question?", + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, "end": { "line": 2, "column": 26 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-output.json index 006bf967..55808ecc 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-output.json @@ -743,16 +743,52 @@ }, { "type": "HTMLText", - "value": "too hot!", + "value": "too", "range": [ 37, - 45 + 40 ], "loc": { "start": { "line": 2, "column": 4 }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "hot!", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, "end": { "line": 2, "column": 12 @@ -1049,16 +1085,52 @@ }, { "type": "HTMLText", - "value": "too cold!", + "value": "too", "range": [ 91, - 100 + 94 ], "loc": { "start": { "line": 4, "column": 4 }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "cold!", + "range": [ + 95, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, "end": { "line": 4, "column": 13 @@ -1247,16 +1319,52 @@ }, { "type": "HTMLText", - "value": "just right!", + "value": "just", "range": [ 117, - 128 + 121 ], "loc": { "start": { "line": 6, "column": 4 }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "right!", + "range": [ + 122, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, "end": { "line": 6, "column": 15 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-output.json index 157f0ed7..02e6975d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-output.json @@ -577,16 +577,52 @@ }, { "type": "HTMLText", - "value": "Shopping list", + "value": "Shopping", "range": [ 4, - 17 + 12 ], "loc": { "start": { "line": 1, "column": 4 }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "list", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, "end": { "line": 1, "column": 17 @@ -1009,16 +1045,52 @@ }, { "type": "HTMLText", - "value": " x ", + "value": " ", "range": [ 68, - 71 + 69 ], "loc": { "start": { "line": 4, "column": 17 }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, "end": { "line": 4, "column": 20 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-output.json index 45284f1c..30e5992d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-output.json @@ -699,16 +699,34 @@ }, { "type": "HTMLText", - "value": ": ", + "value": ":", "range": [ 37, - 39 + 38 ], "loc": { "start": { "line": 2, "column": 12 }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, "end": { "line": 2, "column": 14 @@ -807,16 +825,52 @@ }, { "type": "HTMLText", - "value": " x ", + "value": " ", "range": [ 50, - 53 + 51 ], "loc": { "start": { "line": 2, "column": 25 }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, "end": { "line": 2, "column": 28 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-output.json index 784648ec..93479b17 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-output.json @@ -1211,16 +1211,52 @@ }, { "type": "HTMLText", - "value": " x ", + "value": " ", "range": [ 48, - 51 + 49 ], "loc": { "start": { "line": 2, "column": 16 }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, "end": { "line": 2, "column": 19 @@ -1877,16 +1913,34 @@ }, { "type": "HTMLText", - "value": ": ", + "value": ":", "range": [ 163, - 165 + 164 ], "loc": { "start": { "line": 7, "column": 12 }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, "end": { "line": 7, "column": 14 @@ -1985,16 +2039,52 @@ }, { "type": "HTMLText", - "value": " x ", + "value": " ", "range": [ 176, - 179 + 177 ], "loc": { "start": { "line": 7, "column": 25 }, + "end": { + "line": 7, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, "end": { "line": 7, "column": 28 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-output.json index c5631711..16e88ee9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-output.json @@ -1868,16 +1868,34 @@ }, { "type": "HTMLText", - "value": ": ", + "value": ":", "range": [ 55, - 57 + 56 ], "loc": { "start": { "line": 2, "column": 12 }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, "end": { "line": 2, "column": 14 @@ -1940,16 +1958,52 @@ }, { "type": "HTMLText", - "value": " x ", + "value": " ", "range": [ 63, - 66 + 64 ], "loc": { "start": { "line": 2, "column": 20 }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, "end": { "line": 2, "column": 23 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-output.json index 40d2f3e2..00d19dac 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-output.json @@ -754,16 +754,88 @@ }, { "type": "HTMLText", - "value": "No tasks today!", + "value": "No", "range": [ 54, - 69 + 56 ], "loc": { "start": { "line": 4, "column": 4 }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "tasks", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "today!", + "range": [ + 63, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, "end": { "line": 4, "column": 19 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-output.json index 1196c448..9440722c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-output.json @@ -916,16 +916,196 @@ }, { "type": "HTMLText", - "value": "waiting for the promise to resolve...", + "value": "waiting", "range": [ 50, - 87 + 57 ], "loc": { "start": { "line": 3, "column": 4 }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "for", + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 62, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "promise", + "range": [ + 66, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 74, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "resolve...", + "range": [ + 77, + 87 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, "end": { "line": 3, "column": 41 @@ -1204,16 +1384,106 @@ }, { "type": "HTMLText", - "value": "The value is ", + "value": "The", "range": [ 142, - 155 + 145 ], "loc": { "start": { "line": 6, "column": 4 }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "value", + "range": [ + 146, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, "end": { "line": 6, "column": 17 @@ -1546,16 +1816,106 @@ }, { "type": "HTMLText", - "value": "Something went wrong: ", + "value": "Something", "range": [ 217, - 239 + 226 ], "loc": { "start": { "line": 9, "column": 4 }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 226, + 227 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "went", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "wrong:", + "range": [ + 232, + 238 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 238, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, "end": { "line": 9, "column": 26 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-output.json index 30f84535..e5e3f042 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-output.json @@ -643,16 +643,196 @@ }, { "type": "HTMLText", - "value": "waiting for the promise to resolve...", + "value": "waiting", "range": [ 48, - 85 + 55 ], "loc": { "start": { "line": 3, "column": 3 }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "for", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "promise", + "range": [ + 64, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 72, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "resolve...", + "range": [ + 75, + 85 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, "end": { "line": 3, "column": 40 @@ -931,16 +1111,106 @@ }, { "type": "HTMLText", - "value": "The value is ", + "value": "The", "range": [ 138, - 151 + 141 ], "loc": { "start": { "line": 6, "column": 3 }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "value", + "range": [ + 142, + 147 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 148, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, "end": { "line": 6, "column": 16 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-output.json index a8462022..09055b09 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-output.json @@ -425,16 +425,106 @@ }, { "type": "HTMLText", - "value": "The value is ", + "value": "The", "range": [ 32, - 45 + 35 ], "loc": { "start": { "line": 2, "column": 4 }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "value", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 42, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, "end": { "line": 2, "column": 17 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-output.json index 0547d2f7..c28380e4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-output.json @@ -425,16 +425,106 @@ }, { "type": "HTMLText", - "value": "The error is ", + "value": "The", "range": [ 33, - 46 + 36 ], "loc": { "start": { "line": 2, "column": 4 }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "error", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 43, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, "end": { "line": 2, "column": 17 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-output.json index 5da1032b..3dd2fb6b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-output.json @@ -1048,16 +1048,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 100, - 106 + 105 ], "loc": { "start": { "line": 10, "column": 4 }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, "end": { "line": 10, "column": 10 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-output.json index 8c97d0be..188ce8b4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-output.json @@ -1152,16 +1152,52 @@ }, { "type": "HTMLText", - "value": "\n\tcount: ", + "value": "\n\t", "range": [ 116, - 125 + 118 ], "loc": { "start": { "line": 9, "column": 31 }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "count:", + "range": [ + 118, + 124 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, "end": { "line": 10, "column": 8 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-output.json index dad000e9..e9bd6242 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-output.json @@ -591,16 +591,52 @@ }, { "type": "HTMLText", - "value": "\n\tcount: ", + "value": "\n\t", "range": [ 38, - 47 + 40 ], "loc": { "start": { "line": 1, "column": 38 }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "count:", + "range": [ + 40, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, "end": { "line": 2, "column": 8 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-output.json index c5977e6f..8d0d4992 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-output.json @@ -263,16 +263,304 @@ }, { "type": "HTMLText", - "value": "\n\tThe component itself will emit the click event\n", + "value": "\n\t", "range": [ 17, - 66 + 19 ], "loc": { "start": { "line": 1, "column": 17 }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "component", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "itself", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "will", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "emit", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 50, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": "click", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 36 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "event", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 42 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 47 + }, "end": { "line": 3, "column": 0 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-output.json index 2de577ac..ef077732 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-output.json @@ -1679,16 +1679,52 @@ }, { "type": "HTMLText", - "value": "Click me!", + "value": "Click", "range": [ 185, - 194 + 190 ], "loc": { "start": { "line": 12, "column": 46 }, + "end": { + "line": 12, + "column": 51 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 12, + "column": 51 + }, + "end": { + "line": 12, + "column": 52 + } + } + }, + { + "type": "HTMLText", + "value": "me!", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 12, + "column": 52 + }, "end": { "line": 12, "column": 55 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-output.json index e9b483f3..ed3a41ab 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-output.json @@ -672,16 +672,88 @@ }, { "type": "HTMLText", - "value": "Upload a picture:", + "value": "Upload", "range": [ 20, - 37 + 26 ], "loc": { "start": { "line": 1, "column": 20 }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "picture:", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, "end": { "line": 1, "column": 37 @@ -870,16 +942,52 @@ }, { "type": "HTMLText", - "value": "image/png, image/jpeg", + "value": "image/png,", "range": [ 62, - 83 + 72 ], "loc": { "start": { "line": 3, "column": 9 }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "image/jpeg", + "range": [ + 73, + 83 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, "end": { "line": 3, "column": 30 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-output.json index e5d4709c..ba612648 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-output.json @@ -1939,16 +1939,52 @@ }, { "type": "HTMLText", - "value": "Guac (extra)", + "value": "Guac", "range": [ 170, - 182 + 174 ], "loc": { "start": { "line": 5, "column": 16 }, + "end": { + "line": 5, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "(extra)", + "range": [ + 175, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, "end": { "line": 5, "column": 28 @@ -1993,16 +2029,52 @@ }, { "type": "HTMLText", - "value": "Guac (extra)", + "value": "Guac", "range": [ 184, - 196 + 188 ], "loc": { "start": { "line": 5, "column": 30 }, + "end": { + "line": 5, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 5, + "column": 34 + }, + "end": { + "line": 5, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "(extra)", + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 35 + }, "end": { "line": 5, "column": 42 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-output.json index 5029aeb0..490938d5 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-output.json @@ -1405,16 +1405,52 @@ }, { "type": "HTMLText", - "value": "Guac (extra)", + "value": "Guac", "range": [ 121, - 133 + 125 ], "loc": { "start": { "line": 5, "column": 9 }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "(extra)", + "range": [ + 126, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, "end": { "line": 5, "column": 21 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-output.json index be4da873..85d01b61 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-output.json @@ -3181,16 +3181,52 @@ }, { "type": "HTMLText", - "value": "Whole wheat", + "value": "Whole", "range": [ 224, - 235 + 229 ], "loc": { "start": { "line": 8, "column": 49 }, + "end": { + "line": 8, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 8, + "column": 54 + }, + "end": { + "line": 8, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": "wheat", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 8, + "column": 55 + }, "end": { "line": 8, "column": 60 @@ -5107,16 +5143,52 @@ }, { "type": "HTMLText", - "value": "Guac (extra)", + "value": "Guac", "range": [ 581, - 593 + 585 ], "loc": { "start": { "line": 15, "column": 52 }, + "end": { + "line": 15, + "column": 56 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 585, + 586 + ], + "loc": { + "start": { + "line": 15, + "column": 56 + }, + "end": { + "line": 15, + "column": 57 + } + } + }, + { + "type": "HTMLText", + "value": "(extra)", + "range": [ + 586, + 593 + ], + "loc": { + "start": { + "line": 15, + "column": 57 + }, "end": { "line": 15, "column": 64 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-output.json index ad616055..6e5b8f60 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-output.json @@ -376,16 +376,160 @@ }, { "type": "HTMLText", - "value": "\n\t\tfades in and out\n\t", + "value": "\n\t\t", "range": [ 36, - 57 + 39 ], "loc": { "start": { "line": 2, "column": 22 }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "fades", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 45, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 55, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, "end": { "line": 4, "column": 1 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-output.json index 496b9d75..ae01e269 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-output.json @@ -632,16 +632,268 @@ }, { "type": "HTMLText", - "value": "\n\t\tflies in, fades out over two seconds\n\t", + "value": "\n\t\t", "range": [ 59, - 100 + 62 ], "loc": { "start": { "line": 2, "column": 45 }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "flies", + "range": [ + 62, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in,", + "range": [ + 68, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "fades", + "range": [ + 72, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 78, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "over", + "range": [ + 82, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "two", + "range": [ + 87, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "seconds", + "range": [ + 91, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 98, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, "end": { "line": 4, "column": 1 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-output.json index 32263fcb..33e5cfad 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-output.json @@ -3168,16 +3168,88 @@ }, { "type": "HTMLText", - "value": "\n\t\twhooshes in\n\t", + "value": "\n\t\t", "range": [ 423, - 439 + 426 ], "loc": { "start": { "line": 19, "column": 16 }, + "end": { + "line": 20, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "whooshes", + "range": [ + 426, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 434, + 435 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 435, + 437 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 437, + 439 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, "end": { "line": 21, "column": 1 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-output.json index b3e5f61a..c119e0cf 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-output.json @@ -4512,16 +4512,340 @@ }, { "type": "HTMLText", - "value": "\n\t\tThe quick brown fox jumps over the lazy dog\n\t", + "value": "\n\t\t", "range": [ 488, - 536 + 491 ], "loc": { "start": { "line": 26, "column": 36 }, + "end": { + "line": 27, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 491, + 494 + ], + "loc": { + "start": { + "line": 27, + "column": 2 + }, + "end": { + "line": 27, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "quick", + "range": [ + 495, + 500 + ], + "loc": { + "start": { + "line": 27, + "column": 6 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 500, + 501 + ], + "loc": { + "start": { + "line": 27, + "column": 11 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "brown", + "range": [ + 501, + 506 + ], + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 27, + "column": 17 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "fox", + "range": [ + 507, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 18 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 510, + 511 + ], + "loc": { + "start": { + "line": 27, + "column": 21 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "jumps", + "range": [ + 511, + 516 + ], + "loc": { + "start": { + "line": 27, + "column": 22 + }, + "end": { + "line": 27, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 516, + 517 + ], + "loc": { + "start": { + "line": 27, + "column": 27 + }, + "end": { + "line": 27, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "over", + "range": [ + 517, + 521 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 521, + 522 + ], + "loc": { + "start": { + "line": 27, + "column": 32 + }, + "end": { + "line": 27, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 522, + 525 + ], + "loc": { + "start": { + "line": 27, + "column": 33 + }, + "end": { + "line": 27, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 525, + 526 + ], + "loc": { + "start": { + "line": 27, + "column": 36 + }, + "end": { + "line": 27, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "lazy", + "range": [ + 526, + 530 + ], + "loc": { + "start": { + "line": 27, + "column": 37 + }, + "end": { + "line": 27, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 530, + 531 + ], + "loc": { + "start": { + "line": 27, + "column": 41 + }, + "end": { + "line": 27, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "dog", + "range": [ + 531, + 534 + ], + "loc": { + "start": { + "line": 27, + "column": 42 + }, + "end": { + "line": 27, + "column": 45 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 534, + 536 + ], + "loc": { + "start": { + "line": 27, + "column": 45 + }, "end": { "line": 28, "column": 1 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-output.json index 54b4fa9b..4d782217 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-output.json @@ -4993,16 +4993,340 @@ }, { "type": "HTMLText", - "value": "\n\t\tThe quick brown fox jumps over the lazy dog\n\t", + "value": "\n\t\t", "range": [ 534, - 582 + 537 ], "loc": { "start": { "line": 26, "column": 36 }, + "end": { + "line": 27, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 537, + 540 + ], + "loc": { + "start": { + "line": 27, + "column": 2 + }, + "end": { + "line": 27, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 540, + 541 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "quick", + "range": [ + 541, + 546 + ], + "loc": { + "start": { + "line": 27, + "column": 6 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 546, + 547 + ], + "loc": { + "start": { + "line": 27, + "column": 11 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "brown", + "range": [ + 547, + 552 + ], + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 552, + 553 + ], + "loc": { + "start": { + "line": 27, + "column": 17 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "fox", + "range": [ + 553, + 556 + ], + "loc": { + "start": { + "line": 27, + "column": 18 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 556, + 557 + ], + "loc": { + "start": { + "line": 27, + "column": 21 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "jumps", + "range": [ + 557, + 562 + ], + "loc": { + "start": { + "line": 27, + "column": 22 + }, + "end": { + "line": 27, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 562, + 563 + ], + "loc": { + "start": { + "line": 27, + "column": 27 + }, + "end": { + "line": 27, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "over", + "range": [ + 563, + 567 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 567, + 568 + ], + "loc": { + "start": { + "line": 27, + "column": 32 + }, + "end": { + "line": 27, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 568, + 571 + ], + "loc": { + "start": { + "line": 27, + "column": 33 + }, + "end": { + "line": 27, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 571, + 572 + ], + "loc": { + "start": { + "line": 27, + "column": 36 + }, + "end": { + "line": 27, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "lazy", + "range": [ + 572, + 576 + ], + "loc": { + "start": { + "line": 27, + "column": 37 + }, + "end": { + "line": 27, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 576, + 577 + ], + "loc": { + "start": { + "line": 27, + "column": 41 + }, + "end": { + "line": 27, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "dog", + "range": [ + 577, + 580 + ], + "loc": { + "start": { + "line": 27, + "column": 42 + }, + "end": { + "line": 27, + "column": 45 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 580, + 582 + ], + "loc": { + "start": { + "line": 27, + "column": 45 + }, "end": { "line": 28, "column": 1 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-output.json index 9295db51..1486f2e4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-output.json @@ -2294,16 +2294,160 @@ }, { "type": "HTMLText", - "value": "\n\t\tFlies in and out\n\t", + "value": "\n\t\t", "range": [ 264, - 285 + 267 ], "loc": { "start": { "line": 8, "column": 2 }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Flies", + "range": [ + 267, + 272 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 273, + 275 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 276, + 279 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 279, + 280 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 280, + 283 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 283, + 285 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, "end": { "line": 10, "column": 1 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-output.json index 5a8e429d..691b85b8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-output.json @@ -657,16 +657,340 @@ }, { "type": "HTMLText", - "value": "\n\t\t\tfades in and out when x or y change\n\t\t", + "value": "\n\t\t\t", "range": [ 38, - 80 + 42 ], "loc": { "start": { "line": 3, "column": 21 }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "HTMLText", + "value": "fades", + "range": [ + 42, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 48, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 51, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 55, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "when", + "range": [ + 59, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "or", + "range": [ + 66, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "y", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "change", + "range": [ + 71, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t\t", + "range": [ + 77, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, "end": { "line": 5, "column": 2 @@ -909,16 +1233,304 @@ }, { "type": "HTMLText", - "value": "\n\t\t\tfades in and out only when y changes\n\t\t", + "value": "\n\t\t\t", "range": [ 113, - 156 + 117 ], "loc": { "start": { "line": 7, "column": 27 }, + "end": { + "line": 8, + "column": 3 + } + } + }, + { + "type": "HTMLText", + "value": "fades", + "range": [ + 117, + 122 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 123, + 125 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 126, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 130, + 133 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "only", + "range": [ + 134, + 138 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "when", + "range": [ + 139, + 143 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "y", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "changes", + "range": [ + 146, + 153 + ], + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 8, + "column": 39 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t\t", + "range": [ + 153, + 156 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, "end": { "line": 9, "column": 2 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-output.json index 69d141ba..5f216b32 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-output.json @@ -487,16 +487,160 @@ }, { "type": "HTMLText", - "value": "\n\t\tflies in, fades out\n\t", + "value": "\n\t\t", "range": [ 36, - 60 + 39 ], "loc": { "start": { "line": 2, "column": 22 }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "flies", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in,", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "fades", + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 55, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 58, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, "end": { "line": 4, "column": 1 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-this/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-this/02-output.json index 7deb0d6f..dc9b03ba 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-this/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-this/02-output.json @@ -920,16 +920,124 @@ }, { "type": "HTMLText", - "value": "\n\tEmpty shopping cart\n", + "value": "\n\t", "range": [ 72, - 94 + 74 ], "loc": { "start": { "line": 3, "column": 38 }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Empty", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "shopping", + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "cart", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, "end": { "line": 5, "column": 0 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-output.json index 44933867..d7770730 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-output.json @@ -790,10 +790,10 @@ }, { "type": "HTMLText", - "value": "\n\t\tthis fallback content will be rendered when no content is provided, like in the first example\n\t", + "value": "\n\t\t", "range": [ 36, - 134 + 39 ], "loc": { "start": { @@ -801,350 +801,350 @@ "column": 7 }, "end": { - "line": 5, - "column": 1 + "line": 4, + "column": 2 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "this", "range": [ - 134, - 135 + 39, + 43 ], "loc": { "start": { - "line": 5, - "column": 1 + "line": 4, + "column": 2 }, "end": { - "line": 5, - "column": 2 + "line": 4, + "column": 6 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": " ", "range": [ - 135, - 136 + 43, + 44 ], "loc": { "start": { - "line": 5, - "column": 2 + "line": 4, + "column": 6 }, "end": { - "line": 5, - "column": 3 + "line": 4, + "column": 7 } } }, { - "type": "HTMLIdentifier", - "value": "slot", + "type": "HTMLText", + "value": "fallback", "range": [ - 136, - 140 + 44, + 52 ], "loc": { "start": { - "line": 5, - "column": 3 + "line": 4, + "column": 7 }, "end": { - "line": 5, - "column": 7 + "line": 4, + "column": 15 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": " ", "range": [ - 140, - 141 + 52, + 53 ], "loc": { "start": { - "line": 5, - "column": 7 + "line": 4, + "column": 15 }, "end": { - "line": 5, - "column": 8 + "line": 4, + "column": 16 } } }, { "type": "HTMLText", - "value": "\n", + "value": "content", "range": [ - 141, - 142 + 53, + 60 ], "loc": { "start": { - "line": 5, - "column": 8 + "line": 4, + "column": 16 }, "end": { - "line": 6, - "column": 0 + "line": 4, + "column": 23 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": " ", "range": [ - 142, - 143 + 60, + 61 ], "loc": { "start": { - "line": 6, - "column": 0 + "line": 4, + "column": 23 }, "end": { - "line": 6, - "column": 1 + "line": 4, + "column": 24 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": "will", "range": [ - 143, - 144 + 61, + 65 ], "loc": { "start": { - "line": 6, - "column": 1 + "line": 4, + "column": 24 }, "end": { - "line": 6, - "column": 2 + "line": 4, + "column": 28 } } }, { - "type": "HTMLIdentifier", - "value": "div", + "type": "HTMLText", + "value": " ", "range": [ - 144, - 147 + 65, + 66 ], "loc": { "start": { - "line": 6, - "column": 2 + "line": 4, + "column": 28 }, "end": { - "line": 6, - "column": 5 + "line": 4, + "column": 29 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "be", "range": [ - 147, - 148 + 66, + 68 ], "loc": { "start": { - "line": 6, - "column": 5 + "line": 4, + "column": 29 }, "end": { - "line": 6, - "column": 6 + "line": 4, + "column": 31 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": " ", "range": [ - 148, - 150 + 68, + 69 ], "loc": { "start": { - "line": 6, - "column": 6 + "line": 4, + "column": 31 }, "end": { - "line": 8, - "column": 0 + "line": 4, + "column": 32 } } }, { - "type": "HTMLComment", - "value": "", + "type": "HTMLText", + "value": "rendered", "range": [ - 150, - 169 + 69, + 77 ], "loc": { "start": { - "line": 8, - "column": 0 + "line": 4, + "column": 32 }, "end": { - "line": 8, - "column": 19 + "line": 4, + "column": 40 } } }, { "type": "HTMLText", - "value": "\n", + "value": " ", "range": [ - 169, - 170 + 77, + 78 ], "loc": { "start": { - "line": 8, - "column": 19 + "line": 4, + "column": 40 }, "end": { - "line": 9, - "column": 0 + "line": 4, + "column": 41 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "when", "range": [ - 170, - 171 + 78, + 82 ], "loc": { "start": { - "line": 9, - "column": 0 + "line": 4, + "column": 41 }, "end": { - "line": 9, - "column": 1 + "line": 4, + "column": 45 } } }, { - "type": "Identifier", - "value": "Widget", + "type": "HTMLText", + "value": " ", "range": [ - 171, - 177 + 82, + 83 ], "loc": { "start": { - "line": 9, - "column": 1 + "line": 4, + "column": 45 }, "end": { - "line": 9, - "column": 7 + "line": 4, + "column": 46 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "no", "range": [ - 177, - 178 + 83, + 85 ], "loc": { "start": { - "line": 9, - "column": 7 + "line": 4, + "column": 46 }, "end": { - "line": 9, - "column": 8 + "line": 4, + "column": 48 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": " ", "range": [ - 178, - 179 + 85, + 86 ], "loc": { "start": { - "line": 9, - "column": 8 + "line": 4, + "column": 48 }, "end": { - "line": 9, - "column": 9 + "line": 4, + "column": 49 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": "content", "range": [ - 179, - 180 + 86, + 93 ], "loc": { "start": { - "line": 9, - "column": 9 + "line": 4, + "column": 49 }, "end": { - "line": 9, - "column": 10 + "line": 4, + "column": 56 } } }, { - "type": "HTMLIdentifier", - "value": "Widget", + "type": "HTMLText", + "value": " ", "range": [ - 180, - 186 + 93, + 94 ], "loc": { "start": { - "line": 9, - "column": 10 + "line": 4, + "column": 56 }, "end": { - "line": 9, - "column": 16 + "line": 4, + "column": 57 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "is", "range": [ - 186, - 187 + 94, + 96 ], "loc": { "start": { - "line": 9, - "column": 16 + "line": 4, + "column": 57 }, "end": { - "line": 9, - "column": 17 + "line": 4, + "column": 59 } } }, @@ -1152,193 +1152,1165 @@ "type": "HTMLText", "value": " ", "range": [ - 187, - 188 + 96, + 97 ], "loc": { "start": { - "line": 9, - "column": 17 + "line": 4, + "column": 59 }, "end": { - "line": 9, - "column": 18 + "line": 4, + "column": 60 } } }, { - "type": "HTMLComment", - "value": "", + "type": "HTMLText", + "value": "provided,", "range": [ - 188, - 243 + 97, + 106 ], "loc": { "start": { - "line": 9, - "column": 18 + "line": 4, + "column": 60 }, "end": { - "line": 9, - "column": 73 + "line": 4, + "column": 69 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": " ", "range": [ - 243, - 245 + 106, + 107 ], "loc": { "start": { - "line": 9, - "column": 73 + "line": 4, + "column": 69 }, "end": { - "line": 11, - "column": 0 + "line": 4, + "column": 70 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "like", "range": [ - 245, - 246 + 107, + 111 ], "loc": { "start": { - "line": 11, - "column": 0 + "line": 4, + "column": 70 }, "end": { - "line": 11, - "column": 1 + "line": 4, + "column": 74 } } }, { - "type": "Identifier", - "value": "Widget", + "type": "HTMLText", + "value": " ", "range": [ - 246, - 252 + 111, + 112 ], "loc": { "start": { - "line": 11, - "column": 1 + "line": 4, + "column": 74 }, "end": { - "line": 11, - "column": 7 + "line": 4, + "column": 75 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "in", "range": [ - 252, - 253 + 112, + 114 ], "loc": { "start": { - "line": 11, - "column": 7 + "line": 4, + "column": 75 }, "end": { - "line": 11, - "column": 8 + "line": 4, + "column": 77 } } }, { "type": "HTMLText", - "value": "\n\t", + "value": " ", "range": [ - 253, - 255 + 114, + 115 ], "loc": { "start": { - "line": 11, - "column": 8 + "line": 4, + "column": 77 }, "end": { - "line": 12, - "column": 1 + "line": 4, + "column": 78 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "the", "range": [ - 255, - 256 + 115, + 118 ], "loc": { "start": { - "line": 12, - "column": 1 + "line": 4, + "column": 78 + }, + "end": { + "line": 4, + "column": 81 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 118, + 119 + ], + "loc": { + "start": { + "line": 4, + "column": 81 + }, + "end": { + "line": 4, + "column": 82 + } + } + }, + { + "type": "HTMLText", + "value": "first", + "range": [ + 119, + 124 + ], + "loc": { + "start": { + "line": 4, + "column": 82 + }, + "end": { + "line": 4, + "column": 87 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 4, + "column": 87 + }, + "end": { + "line": 4, + "column": 88 + } + } + }, + { + "type": "HTMLText", + "value": "example", + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 4, + "column": 88 + }, + "end": { + "line": 4, + "column": 95 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 132, + 134 + ], + "loc": { + "start": { + "line": 4, + "column": 95 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "slot", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "div", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 148, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 8, + "column": 0 + } + } + }, + { + "type": "HTMLComment", + "value": "", + "range": [ + 150, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 169, + 170 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 9, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "Widget", + "range": [ + 171, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "Widget", + "range": [ + 180, + 186 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "HTMLComment", + "value": "", + "range": [ + 188, + 243 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 73 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 243, + 245 + ], + "loc": { + "start": { + "line": 9, + "column": 73 + }, + "end": { + "line": 11, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 245, + 246 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "Widget", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 252, + 253 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 253, + 255 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 256, + 257 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": "this", + "range": [ + 258, + 262 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 263, + 265 + ], + "loc": { + "start": { + "line": 12, + "column": 9 }, "end": { "line": 12, - "column": 2 + "column": 11 } } }, { - "type": "HTMLIdentifier", - "value": "p", + "type": "HTMLText", + "value": " ", "range": [ - 256, - 257 + 265, + 266 ], "loc": { "start": { "line": 12, - "column": 2 + "column": 11 }, "end": { "line": 12, - "column": 3 + "column": 12 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "some", "range": [ - 257, - 258 + 266, + 270 ], "loc": { "start": { "line": 12, - "column": 3 + "column": 12 }, "end": { "line": 12, - "column": 4 + "column": 16 } } }, { "type": "HTMLText", - "value": "this is some child content that will overwrite the default slot content", + "value": " ", "range": [ - 258, + 270, + 271 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "child", + "range": [ + 271, + 276 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 12, + "column": 22 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "content", + "range": [ + 277, + 284 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 12, + "column": 30 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "that", + "range": [ + 285, + 289 + ], + "loc": { + "start": { + "line": 12, + "column": 31 + }, + "end": { + "line": 12, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 289, + 290 + ], + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": "will", + "range": [ + 290, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 40 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 12, + "column": 40 + }, + "end": { + "line": 12, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "overwrite", + "range": [ + 295, + 304 + ], + "loc": { + "start": { + "line": 12, + "column": 41 + }, + "end": { + "line": 12, + "column": 50 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 12, + "column": 50 + }, + "end": { + "line": 12, + "column": 51 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 305, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 51 + }, + "end": { + "line": 12, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 12, + "column": 54 + }, + "end": { + "line": 12, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": "default", + "range": [ + 309, + 316 + ], + "loc": { + "start": { + "line": 12, + "column": 55 + }, + "end": { + "line": 12, + "column": 62 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 316, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 62 + }, + "end": { + "line": 12, + "column": 63 + } + } + }, + { + "type": "HTMLText", + "value": "slot", + "range": [ + 317, + 321 + ], + "loc": { + "start": { + "line": 12, + "column": 63 + }, + "end": { + "line": 12, + "column": 67 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 321, + 322 + ], + "loc": { + "start": { + "line": 12, + "column": 67 + }, + "end": { + "line": 12, + "column": 68 + } + } + }, + { + "type": "HTMLText", + "value": "content", + "range": [ + 322, 329 ], "loc": { "start": { "line": 12, - "column": 4 + "column": 68 }, "end": { "line": 12, diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-output.json index f53d6758..0eaed242 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-output.json @@ -1292,16 +1292,124 @@ }, { "type": "HTMLText", - "value": "No header was provided", + "value": "No", "range": [ 50, - 72 + 52 ], "loc": { "start": { "line": 3, "column": 21 }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "header", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "was", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "provided", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, "end": { "line": 3, "column": 43 @@ -1454,16 +1562,196 @@ }, { "type": "HTMLText", - "value": "Some content between header and footer", + "value": "Some", "range": [ 84, - 122 + 88 ], "loc": { "start": { "line": 4, "column": 4 }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "content", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "between", + "range": [ + 97, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "header", + "range": [ + 105, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 112, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": "footer", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, "end": { "line": 4, "column": 42 @@ -2390,16 +2678,160 @@ }, { "type": "HTMLText", - "value": "Copyright (c) 2019 Svelte Industries", + "value": "Copyright", "range": [ 241, - 277 + 250 ], "loc": { "start": { "line": 11, "column": 18 }, + "end": { + "line": 11, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 250, + 251 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "(c)", + "range": [ + 251, + 254 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 254, + 255 + ], + "loc": { + "start": { + "line": 11, + "column": 31 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "2019", + "range": [ + 255, + 259 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 11, + "column": 36 + }, + "end": { + "line": 11, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "Svelte", + "range": [ + 260, + 266 + ], + "loc": { + "start": { + "line": 11, + "column": 37 + }, + "end": { + "line": 11, + "column": 43 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 11, + "column": 43 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + { + "type": "HTMLText", + "value": "Industries", + "range": [ + 267, + 277 + ], + "loc": { + "start": { + "line": 11, + "column": 44 + }, "end": { "line": 11, "column": 54 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-output.json index a816fbc5..c939cc6c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-output.json @@ -1477,16 +1477,124 @@ }, { "type": "HTMLText", - "value": "No header was provided", + "value": "No", "range": [ 50, - 72 + 52 ], "loc": { "start": { "line": 3, "column": 21 }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "header", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "was", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "provided", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, "end": { "line": 3, "column": 43 @@ -1639,16 +1747,196 @@ }, { "type": "HTMLText", - "value": "Some content between header and footer", + "value": "Some", "range": [ 84, - 122 + 88 ], "loc": { "start": { "line": 4, "column": 4 }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "content", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "between", + "range": [ + 97, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "header", + "range": [ + 105, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 112, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": "footer", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, "end": { "line": 4, "column": 42 @@ -2575,16 +2863,88 @@ }, { "type": "HTMLText", - "value": "All rights reserved.", + "value": "All", "range": [ 266, - 286 + 269 ], "loc": { "start": { "line": 12, "column": 5 }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "rights", + "range": [ + 270, + 276 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "reserved.", + "range": [ + 277, + 286 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, "end": { "line": 12, "column": 25 @@ -2737,16 +3097,160 @@ }, { "type": "HTMLText", - "value": "Copyright (c) 2019 Svelte Industries", + "value": "Copyright", "range": [ 296, - 332 + 305 ], "loc": { "start": { "line": 13, "column": 5 }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 305, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "(c)", + "range": [ + 306, + 309 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 309, + 310 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "2019", + "range": [ + 310, + 314 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 314, + 315 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "Svelte", + "range": [ + 315, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 321, + 322 + ], + "loc": { + "start": { + "line": 13, + "column": 30 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "Industries", + "range": [ + 322, + 332 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, "end": { "line": 13, "column": 41 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-output.json index c944a646..5c141781 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-output.json @@ -2155,16 +2155,88 @@ }, { "type": "HTMLText", - "value": "Blog Post Title", + "value": "Blog", "range": [ 274, - 289 + 278 ], "loc": { "start": { "line": 13, "column": 18 }, + "end": { + "line": 13, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 278, + 279 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "Post", + "range": [ + 279, + 283 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 283, + 284 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "Title", + "range": [ + 284, + 289 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, "end": { "line": 13, "column": 33 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-output.json index dc9bc6fe..3227a659 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-output.json @@ -3188,16 +3188,160 @@ }, { "type": "HTMLText", - "value": "Copyright (c) 2019 Svelte Industries", + "value": "Copyright", "range": [ 267, - 303 + 276 ], "loc": { "start": { "line": 15, "column": 18 }, + "end": { + "line": 15, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 15, + "column": 27 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "(c)", + "range": [ + 277, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 28 + }, + "end": { + "line": 15, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 280, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 31 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "2019", + "range": [ + 281, + 285 + ], + "loc": { + "start": { + "line": 15, + "column": 32 + }, + "end": { + "line": 15, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 285, + 286 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "Svelte", + "range": [ + 286, + 292 + ], + "loc": { + "start": { + "line": 15, + "column": 37 + }, + "end": { + "line": 15, + "column": 43 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 292, + 293 + ], + "loc": { + "start": { + "line": 15, + "column": 43 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + { + "type": "HTMLText", + "value": "Industries", + "range": [ + 293, + 303 + ], + "loc": { + "start": { + "line": 15, + "column": 44 + }, "end": { "line": 15, "column": 54 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-output.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-output.json index c64d7210..581ef1dc 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-output.json @@ -1052,16 +1052,70 @@ }, { "type": "HTMLText", - "value": "counting down... ", + "value": "counting", "range": [ 59, - 76 + 67 ], "loc": { "start": { "line": 6, "column": 4 }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "down...", + "range": [ + 68, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, "end": { "line": 6, "column": 21 diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-output.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-output.json index 748e719c..d7aea4f3 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-output.json @@ -1512,16 +1512,124 @@ }, { "type": "HTMLText", - "value": "No header was provided", + "value": "No", "range": [ 50, - 72 + 52 ], "loc": { "start": { "line": 3, "column": 21 }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "header", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "was", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "provided", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, "end": { "line": 3, "column": 43 @@ -1674,16 +1782,196 @@ }, { "type": "HTMLText", - "value": "Some content between header and footer", + "value": "Some", "range": [ 84, - 122 + 88 ], "loc": { "start": { "line": 4, "column": 4 }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "content", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "between", + "range": [ + 97, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "header", + "range": [ + 105, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 112, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": "footer", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, "end": { "line": 4, "column": 42 @@ -2682,16 +2970,88 @@ }, { "type": "HTMLText", - "value": "All rights reserved.", + "value": "All", "range": [ 261, - 281 + 264 ], "loc": { "start": { "line": 12, "column": 5 }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 264, + 265 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "rights", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "reserved.", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, "end": { "line": 12, "column": 25 @@ -2844,16 +3204,160 @@ }, { "type": "HTMLText", - "value": "Copyright (c) 2019 Svelte Industries", + "value": "Copyright", "range": [ 291, - 327 + 300 ], "loc": { "start": { "line": 13, "column": 5 }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "(c)", + "range": [ + 301, + 304 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "2019", + "range": [ + 305, + 309 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 309, + 310 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "Svelte", + "range": [ + 310, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 316, + 317 + ], + "loc": { + "start": { + "line": 13, + "column": 30 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "Industries", + "range": [ + 317, + 327 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, "end": { "line": 13, "column": 41 diff --git a/tests/fixtures/parser/ast/hello/hello-world01-output.json b/tests/fixtures/parser/ast/hello/hello-world01-output.json index 916d2062..8f33258a 100644 --- a/tests/fixtures/parser/ast/hello/hello-world01-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world01-output.json @@ -606,16 +606,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 45, - 51 + 50 ], "loc": { "start": { "line": 5, "column": 4 }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, "end": { "line": 5, "column": 10 diff --git a/tests/fixtures/parser/ast/hello/hello-world02-output.json b/tests/fixtures/parser/ast/hello/hello-world02-output.json index 6429cc61..8d891093 100644 --- a/tests/fixtures/parser/ast/hello/hello-world02-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world02-output.json @@ -897,16 +897,52 @@ }, { "type": "HTMLText", - "value": "These styles...", + "value": "These", "range": [ 164, - 179 + 169 ], "loc": { "start": { "line": 13, "column": 3 }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 169, + 170 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "styles...", + "range": [ + 170, + 179 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, "end": { "line": 13, "column": 18 diff --git a/tests/fixtures/parser/ast/hello/hello-world03-output.json b/tests/fixtures/parser/ast/hello/hello-world03-output.json index 343df6ab..bb46d2ee 100644 --- a/tests/fixtures/parser/ast/hello/hello-world03-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world03-output.json @@ -153,16 +153,124 @@ }, { "type": "HTMLText", - "value": "...don't affect this element", + "value": "...don't", "range": [ 3, - 31 + 11 ], "loc": { "start": { "line": 1, "column": 3 }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "affect", + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "this", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "element", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, "end": { "line": 1, "column": 31 diff --git a/tests/fixtures/parser/ast/hello/hello-world04-output.json b/tests/fixtures/parser/ast/hello/hello-world04-output.json index ddc8e7e2..adc67a39 100644 --- a/tests/fixtures/parser/ast/hello/hello-world04-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world04-output.json @@ -1261,16 +1261,52 @@ }, { "type": "HTMLText", - "value": "\n\tClicked ", + "value": "\n\t", "range": [ 111, - 121 + 113 ], "loc": { "start": { "line": 9, "column": 31 }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Clicked", + "range": [ + 113, + 120 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, "end": { "line": 10, "column": 9 diff --git a/tests/fixtures/parser/ast/hello/hello-world05-output.json b/tests/fixtures/parser/ast/hello/hello-world05-output.json index 98591970..3a96cbef 100644 --- a/tests/fixtures/parser/ast/hello/hello-world05-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world05-output.json @@ -4749,16 +4749,124 @@ }, { "type": "HTMLText", - "value": "0 0 103 124", + "value": "0", "range": [ 712, - 723 + 713 ], "loc": { "start": { "line": 45, "column": 50 }, + "end": { + "line": 45, + "column": 51 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 713, + 714 + ], + "loc": { + "start": { + "line": 45, + "column": 51 + }, + "end": { + "line": 45, + "column": 52 + } + } + }, + { + "type": "HTMLText", + "value": "0", + "range": [ + 714, + 715 + ], + "loc": { + "start": { + "line": 45, + "column": 52 + }, + "end": { + "line": 45, + "column": 53 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 715, + 716 + ], + "loc": { + "start": { + "line": 45, + "column": 53 + }, + "end": { + "line": 45, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": "103", + "range": [ + 716, + 719 + ], + "loc": { + "start": { + "line": 45, + "column": 54 + }, + "end": { + "line": 45, + "column": 57 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 719, + 720 + ], + "loc": { + "start": { + "line": 45, + "column": 57 + }, + "end": { + "line": 45, + "column": 58 + } + } + }, + { + "type": "HTMLText", + "value": "124", + "range": [ + 720, + 723 + ], + "loc": { + "start": { + "line": 45, + "column": 58 + }, "end": { "line": 45, "column": 61 @@ -5649,16 +5757,196 @@ }, { "type": "HTMLText", - "value": "stroke: #ff3e00; fill: #ff3e00; stroke-width: 50;", + "value": "stroke:", "range": [ 858, - 907 + 865 ], "loc": { "start": { "line": 49, "column": 11 }, + "end": { + "line": 49, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 865, + 866 + ], + "loc": { + "start": { + "line": 49, + "column": 18 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "#ff3e00;", + "range": [ + 866, + 874 + ], + "loc": { + "start": { + "line": 49, + "column": 19 + }, + "end": { + "line": 49, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 874, + 875 + ], + "loc": { + "start": { + "line": 49, + "column": 27 + }, + "end": { + "line": 49, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "fill:", + "range": [ + 875, + 880 + ], + "loc": { + "start": { + "line": 49, + "column": 28 + }, + "end": { + "line": 49, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 880, + 881 + ], + "loc": { + "start": { + "line": 49, + "column": 33 + }, + "end": { + "line": 49, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "#ff3e00;", + "range": [ + 881, + 889 + ], + "loc": { + "start": { + "line": 49, + "column": 34 + }, + "end": { + "line": 49, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 889, + 890 + ], + "loc": { + "start": { + "line": 49, + "column": 42 + }, + "end": { + "line": 49, + "column": 43 + } + } + }, + { + "type": "HTMLText", + "value": "stroke-width:", + "range": [ + 890, + 903 + ], + "loc": { + "start": { + "line": 49, + "column": 43 + }, + "end": { + "line": 49, + "column": 56 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 903, + 904 + ], + "loc": { + "start": { + "line": 49, + "column": 56 + }, + "end": { + "line": 49, + "column": 57 + } + } + }, + { + "type": "HTMLText", + "value": "50;", + "range": [ + 904, + 907 + ], + "loc": { + "start": { + "line": 49, + "column": 57 + }, "end": { "line": 49, "column": 60 @@ -6153,16 +6441,88 @@ }, { "type": "HTMLText", - "value": "stroke:#ff3e00; stroke-width: 1.5", + "value": "stroke:#ff3e00;", "range": [ 982, - 1015 + 997 ], "loc": { "start": { "line": 54, "column": 11 }, + "end": { + "line": 54, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 997, + 998 + ], + "loc": { + "start": { + "line": 54, + "column": 26 + }, + "end": { + "line": 54, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "stroke-width:", + "range": [ + 998, + 1011 + ], + "loc": { + "start": { + "line": 54, + "column": 27 + }, + "end": { + "line": 54, + "column": 40 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1011, + 1012 + ], + "loc": { + "start": { + "line": 54, + "column": 40 + }, + "end": { + "line": 54, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "1.5", + "range": [ + 1012, + 1015 + ], + "loc": { + "start": { + "line": 54, + "column": 41 + }, "end": { "line": 54, "column": 44 @@ -8259,16 +8619,88 @@ }, { "type": "HTMLText", - "value": "\n\ttoggle me\n", + "value": "\n\t", "range": [ 1305, - 1317 + 1307 ], "loc": { "start": { "line": 70, "column": 47 }, + "end": { + "line": 71, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "toggle", + "range": [ + 1307, + 1313 + ], + "loc": { + "start": { + "line": 71, + "column": 1 + }, + "end": { + "line": 71, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1313, + 1314 + ], + "loc": { + "start": { + "line": 71, + "column": 7 + }, + "end": { + "line": 71, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "me", + "range": [ + 1314, + 1316 + ], + "loc": { + "start": { + "line": 71, + "column": 8 + }, + "end": { + "line": 71, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 1316, + 1317 + ], + "loc": { + "start": { + "line": 71, + "column": 10 + }, "end": { "line": 72, "column": 0 diff --git a/tests/fixtures/parser/ast/kit-demo-home-output.json b/tests/fixtures/parser/ast/kit-demo-home-output.json index 9b303dc3..8e46fb69 100644 --- a/tests/fixtures/parser/ast/kit-demo-home-output.json +++ b/tests/fixtures/parser/ast/kit-demo-home-output.json @@ -3946,16 +3946,106 @@ }, { "type": "HTMLText", - "value": "\n\n\t\tto your new", + "value": "\n\n\t\t", "range": [ 378, - 393 + 382 ], "loc": { "start": { "line": 20, "column": 8 }, + "end": { + "line": 22, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 382, + 384 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 384, + 385 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "your", + "range": [ + 385, + 389 + ], + "loc": { + "start": { + "line": 22, + "column": 5 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 389, + 390 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 22, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "new", + "range": [ + 390, + 393 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, "end": { "line": 22, "column": 13 @@ -4036,16 +4126,70 @@ }, { "type": "HTMLText", - "value": "SvelteKit app\n\t", + "value": "SvelteKit", "range": [ 399, - 414 + 408 ], "loc": { "start": { "line": 22, "column": 19 }, + "end": { + "line": 22, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 408, + 409 + ], + "loc": { + "start": { + "line": 22, + "column": 28 + }, + "end": { + "line": 22, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "app", + "range": [ + 409, + 412 + ], + "loc": { + "start": { + "line": 22, + "column": 29 + }, + "end": { + "line": 22, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 412, + 414 + ], + "loc": { + "start": { + "line": 22, + "column": 32 + }, "end": { "line": 23, "column": 1 @@ -4198,16 +4342,88 @@ }, { "type": "HTMLText", - "value": "\n\t\ttry editing ", + "value": "\n\t\t", "range": [ 426, - 441 + 429 ], "loc": { "start": { "line": 25, "column": 5 }, + "end": { + "line": 26, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "try", + "range": [ + 429, + 432 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 432, + 433 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "editing", + "range": [ + 433, + 440 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 440, + 441 + ], + "loc": { + "start": { + "line": 26, + "column": 13 + }, "end": { "line": 26, "column": 14 diff --git a/tests/fixtures/parser/ast/label01-output.json b/tests/fixtures/parser/ast/label01-output.json index 5790f295..70fbdb25 100644 --- a/tests/fixtures/parser/ast/label01-output.json +++ b/tests/fixtures/parser/ast/label01-output.json @@ -2199,16 +2199,52 @@ }, { "type": "HTMLText", - "value": "\n\tClicked ", + "value": "\n\t", "range": [ 163, - 173 + 165 ], "loc": { "start": { "line": 11, "column": 31 }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Clicked", + "range": [ + 165, + 172 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 172, + 173 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, "end": { "line": 12, "column": 9 @@ -2667,16 +2703,88 @@ }, { "type": "HTMLText", - "value": " doubled is ", + "value": " ", "range": [ 234, - 246 + 235 ], "loc": { "start": { "line": 14, "column": 10 }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "doubled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 242, + 243 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 243, + 245 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 245, + 246 + ], + "loc": { + "start": { + "line": 14, + "column": 21 + }, "end": { "line": 14, "column": 22 @@ -2937,16 +3045,88 @@ }, { "type": "HTMLText", - "value": " quadrupled is ", + "value": " ", "range": [ 270, - 285 + 271 ], "loc": { "start": { "line": 15, "column": 10 }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "quadrupled", + "range": [ + 271, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 15, + "column": 21 + }, + "end": { + "line": 15, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 282, + 284 + ], + "loc": { + "start": { + "line": 15, + "column": 22 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, "end": { "line": 15, "column": 25 diff --git a/tests/fixtures/parser/ast/let-directive01-output.json b/tests/fixtures/parser/ast/let-directive01-output.json index c6210d0f..d9d9366c 100644 --- a/tests/fixtures/parser/ast/let-directive01-output.json +++ b/tests/fixtures/parser/ast/let-directive01-output.json @@ -2124,16 +2124,52 @@ }, { "type": "HTMLText", - "value": " no-def\n", + "value": " ", "range": [ 166, - 174 + 167 ], "loc": { "start": { "line": 9, "column": 7 }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "no-def", + "range": [ + 167, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, "end": { "line": 10, "column": 0 @@ -2286,16 +2322,34 @@ }, { "type": "HTMLText", - "value": " no-def", + "value": " ", "range": [ 193, - 200 + 194 ], "loc": { "start": { "line": 11, "column": 6 }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "no-def", + "range": [ + 194, + 200 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, "end": { "line": 11, "column": 13 diff --git a/tests/fixtures/parser/ast/store-bindings-output.json b/tests/fixtures/parser/ast/store-bindings-output.json index 3dc06b72..c7346929 100644 --- a/tests/fixtures/parser/ast/store-bindings-output.json +++ b/tests/fixtures/parser/ast/store-bindings-output.json @@ -1750,16 +1750,124 @@ }, { "type": "HTMLText", - "value": "\n\tAdd exclamation mark!\n", + "value": "\n\t", "range": [ 156, - 180 + 158 ], "loc": { "start": { "line": 8, "column": 40 }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Add", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "exclamation", + "range": [ + 162, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "mark!", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, "end": { "line": 10, "column": 0 diff --git a/tests/fixtures/parser/ast/ts-promise01-output.json b/tests/fixtures/parser/ast/ts-promise01-output.json index 62136555..339841b0 100644 --- a/tests/fixtures/parser/ast/ts-promise01-output.json +++ b/tests/fixtures/parser/ast/ts-promise01-output.json @@ -2412,16 +2412,106 @@ }, { "type": "HTMLText", - "value": "The number is ", + "value": "The", "range": [ 161, - 175 + 164 ], "loc": { "start": { "line": 8, "column": 4 }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "number", + "range": [ + 165, + 171 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 171, + 172 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 172, + 174 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, "end": { "line": 8, "column": 18 @@ -2790,16 +2880,52 @@ }, { "type": "HTMLText", - "value": "color: red", + "value": "color:", "range": [ 216, - 226 + 222 ], "loc": { "start": { "line": 10, "column": 11 }, + "end": { + "line": 10, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 222, + 223 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "red", + "range": [ + 223, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, "end": { "line": 10, "column": 21 diff --git a/tests/fixtures/parser/ast/tutorial/actions-output.json b/tests/fixtures/parser/ast/tutorial/actions-output.json index c998791d..350fceae 100644 --- a/tests/fixtures/parser/ast/tutorial/actions-output.json +++ b/tests/fixtures/parser/ast/tutorial/actions-output.json @@ -6212,16 +6212,52 @@ }, { "type": "HTMLText", - "value": "transform:\n\t\ttranslate(", + "value": "transform:", "range": [ 919, - 942 + 929 ], "loc": { "start": { "line": 48, "column": 8 }, + "end": { + "line": 48, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t\t", + "range": [ + 929, + 932 + ], + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 49, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "translate(", + "range": [ + 932, + 942 + ], + "loc": { + "start": { + "line": 49, + "column": 2 + }, "end": { "line": 49, "column": 12 @@ -6428,16 +6464,52 @@ }, { "type": "HTMLText", - "value": "px)\n\t\trotate(", + "value": "px)", "range": [ 967, - 980 + 970 ], "loc": { "start": { "line": 49, "column": 37 }, + "end": { + "line": 49, + "column": 40 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t\t", + "range": [ + 970, + 973 + ], + "loc": { + "start": { + "line": 49, + "column": 40 + }, + "end": { + "line": 50, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "rotate(", + "range": [ + 973, + 980 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, "end": { "line": 50, "column": 9 diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-output.json b/tests/fixtures/parser/ast/tutorial/adding-data-output.json index 916d2062..8f33258a 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-data-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-data-output.json @@ -606,16 +606,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 45, - 51 + 50 ], "loc": { "start": { "line": 5, "column": 4 }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, "end": { "line": 5, "column": 10 diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-output.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-output.json index 69a80a15..b70388f4 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-output.json @@ -2493,16 +2493,34 @@ }, { "type": "HTMLText", - "value": "ms\n", + "value": "ms", "range": [ 193, - 196 + 195 ], "loc": { "start": { "line": 10, "column": 11 }, + "end": { + "line": 10, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, "end": { "line": 11, "column": 0 @@ -3285,16 +3303,88 @@ }, { "type": "HTMLText", - "value": "press and hold", + "value": "press", "range": [ 320, - 334 + 325 ], "loc": { "start": { "line": 16, "column": 1 }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 325, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 326, + 329 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 329, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "hold", + "range": [ + 330, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, "end": { "line": 16, "column": 15 @@ -3519,16 +3609,214 @@ }, { "type": "HTMLText", - "value": "congratulations, you pressed and held for ", + "value": "congratulations,", "range": [ 363, - 405 + 379 ], "loc": { "start": { "line": 19, "column": 4 }, + "end": { + "line": 19, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 19, + "column": 20 + }, + "end": { + "line": 19, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "you", + "range": [ + 380, + 383 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "pressed", + "range": [ + 384, + 391 + ], + "loc": { + "start": { + "line": 19, + "column": 25 + }, + "end": { + "line": 19, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 391, + 392 + ], + "loc": { + "start": { + "line": 19, + "column": 32 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 392, + 395 + ], + "loc": { + "start": { + "line": 19, + "column": 33 + }, + "end": { + "line": 19, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 395, + 396 + ], + "loc": { + "start": { + "line": 19, + "column": 36 + }, + "end": { + "line": 19, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "held", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 400, + 401 + ], + "loc": { + "start": { + "line": 19, + "column": 41 + }, + "end": { + "line": 19, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "for", + "range": [ + 401, + 404 + ], + "loc": { + "start": { + "line": 19, + "column": 42 + }, + "end": { + "line": 19, + "column": 45 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 404, + 405 + ], + "loc": { + "start": { + "line": 19, + "column": 45 + }, "end": { "line": 19, "column": 46 diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-output.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-output.json index b1d8b3c2..805dac92 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-output.json @@ -1602,16 +1602,52 @@ }, { "type": "HTMLText", - "value": "\n\tvisible\n", + "value": "\n\t", "range": [ 138, - 148 + 140 ], "loc": { "start": { "line": 7, "column": 47 }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "visible", + "range": [ + 140, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, "end": { "line": 9, "column": 0 @@ -2142,16 +2178,160 @@ }, { "type": "HTMLText", - "value": "\n\t\tFades in and out\n\t", + "value": "\n\t\t", "range": [ 222, - 243 + 225 ], "loc": { "start": { "line": 12, "column": 50 }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Fades", + "range": [ + 225, + 230 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 231, + 233 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 233, + 234 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 234, + 237 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 237, + 238 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 238, + 241 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 241, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, "end": { "line": 14, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/animate-output.json b/tests/fixtures/parser/ast/tutorial/animate-output.json index 7bd216ad..fb03fcb1 100644 --- a/tests/fixtures/parser/ast/tutorial/animate-output.json +++ b/tests/fixtures/parser/ast/tutorial/animate-output.json @@ -14211,16 +14211,160 @@ }, { "type": "HTMLText", - "value": "what needs to be done?", + "value": "what", "range": [ 1295, - 1317 + 1299 ], "loc": { "start": { "line": 59, "column": 15 }, + "end": { + "line": 59, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1299, + 1300 + ], + "loc": { + "start": { + "line": 59, + "column": 19 + }, + "end": { + "line": 59, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "needs", + "range": [ + 1300, + 1305 + ], + "loc": { + "start": { + "line": 59, + "column": 20 + }, + "end": { + "line": 59, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1305, + 1306 + ], + "loc": { + "start": { + "line": 59, + "column": 25 + }, + "end": { + "line": 59, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 1306, + 1308 + ], + "loc": { + "start": { + "line": 59, + "column": 26 + }, + "end": { + "line": 59, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1308, + 1309 + ], + "loc": { + "start": { + "line": 59, + "column": 28 + }, + "end": { + "line": 59, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "be", + "range": [ + 1309, + 1311 + ], + "loc": { + "start": { + "line": 59, + "column": 29 + }, + "end": { + "line": 59, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1311, + 1312 + ], + "loc": { + "start": { + "line": 59, + "column": 31 + }, + "end": { + "line": 59, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "done?", + "range": [ + 1312, + 1317 + ], + "loc": { + "start": { + "line": 59, + "column": 32 + }, "end": { "line": 59, "column": 37 diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-output.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-output.json index cffb2091..c386fad6 100644 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-output.json +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-output.json @@ -2412,16 +2412,106 @@ }, { "type": "HTMLText", - "value": "The count is ", + "value": "The", "range": [ 361, - 374 + 364 ], "loc": { "start": { "line": 16, "column": 4 }, + "end": { + "line": 16, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 364, + 365 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "count", + "range": [ + 365, + 370 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 370, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 13 + }, + "end": { + "line": 16, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 371, + 373 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 373, + 374 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, "end": { "line": 16, "column": 17 diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-output.json b/tests/fixtures/parser/ast/tutorial/await-blocks-output.json index 16c138b7..c7aaf894 100644 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-output.json +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-output.json @@ -4422,16 +4422,124 @@ }, { "type": "HTMLText", - "value": "\n\tgenerate random number\n", + "value": "\n\t", "range": [ 346, - 371 + 348 ], "loc": { "start": { "line": 20, "column": 31 }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "generate", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 356, + 357 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "random", + "range": [ + 357, + 363 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 363, + 364 + ], + "loc": { + "start": { + "line": 21, + "column": 16 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "number", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 370, + 371 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, "end": { "line": 22, "column": 0 @@ -4962,16 +5070,106 @@ }, { "type": "HTMLText", - "value": "The number is ", + "value": "The", "range": [ 467, - 481 + 470 ], "loc": { "start": { "line": 28, "column": 4 }, + "end": { + "line": 28, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 470, + 471 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "number", + "range": [ + 471, + 477 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 28, + "column": 14 + }, + "end": { + "line": 28, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 478, + 480 + ], + "loc": { + "start": { + "line": 28, + "column": 15 + }, + "end": { + "line": 28, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 28, + "column": 17 + }, "end": { "line": 28, "column": 18 @@ -5304,16 +5502,52 @@ }, { "type": "HTMLText", - "value": "color: red", + "value": "color:", "range": [ 520, - 530 + 526 ], "loc": { "start": { "line": 30, "column": 11 }, + "end": { + "line": 30, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 526, + 527 + ], + "loc": { + "start": { + "line": 30, + "column": 17 + }, + "end": { + "line": 30, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "red", + "range": [ + 527, + 530 + ], + "loc": { + "start": { + "line": 30, + "column": 18 + }, "end": { "line": 30, "column": 21 @@ -5790,16 +6024,106 @@ }, { "type": "HTMLText", - "value": "the value is ", + "value": "the", "range": [ 594, - 607 + 597 ], "loc": { "start": { "line": 34, "column": 4 }, + "end": { + "line": 34, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 597, + 598 + ], + "loc": { + "start": { + "line": 34, + "column": 7 + }, + "end": { + "line": 34, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "value", + "range": [ + 598, + 603 + ], + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 603, + 604 + ], + "loc": { + "start": { + "line": 34, + "column": 13 + }, + "end": { + "line": 34, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 604, + 606 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 606, + 607 + ], + "loc": { + "start": { + "line": 34, + "column": 16 + }, "end": { "line": 34, "column": 17 @@ -6240,16 +6564,52 @@ }, { "type": "HTMLText", - "value": "color: red", + "value": "color:", "range": [ 669, - 679 + 675 ], "loc": { "start": { "line": 38, "column": 11 }, + "end": { + "line": 38, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 675, + 676 + ], + "loc": { + "start": { + "line": 38, + "column": 17 + }, + "end": { + "line": 38, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "red", + "range": [ + 676, + 679 + ], + "loc": { + "start": { + "line": 38, + "column": 18 + }, "end": { "line": 38, "column": 21 @@ -6726,16 +7086,106 @@ }, { "type": "HTMLText", - "value": "the value is ", + "value": "the", "range": [ 743, - 756 + 746 ], "loc": { "start": { "line": 42, "column": 4 }, + "end": { + "line": 42, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 746, + 747 + ], + "loc": { + "start": { + "line": 42, + "column": 7 + }, + "end": { + "line": 42, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "value", + "range": [ + 747, + 752 + ], + "loc": { + "start": { + "line": 42, + "column": 8 + }, + "end": { + "line": 42, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 752, + 753 + ], + "loc": { + "start": { + "line": 42, + "column": 13 + }, + "end": { + "line": 42, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 753, + 755 + ], + "loc": { + "start": { + "line": 42, + "column": 14 + }, + "end": { + "line": 42, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 755, + 756 + ], + "loc": { + "start": { + "line": 42, + "column": 16 + }, "end": { "line": 42, "column": 17 @@ -7068,16 +7518,52 @@ }, { "type": "HTMLText", - "value": "color: red", + "value": "color:", "range": [ 794, - 804 + 800 ], "loc": { "start": { "line": 44, "column": 11 }, + "end": { + "line": 44, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 800, + 801 + ], + "loc": { + "start": { + "line": 44, + "column": 17 + }, + "end": { + "line": 44, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "red", + "range": [ + 801, + 804 + ], + "loc": { + "start": { + "line": 44, + "column": 18 + }, "end": { "line": 44, "column": 21 diff --git a/tests/fixtures/parser/ast/tutorial/basics-output.json b/tests/fixtures/parser/ast/tutorial/basics-output.json index 7b84e178..be55c8c0 100644 --- a/tests/fixtures/parser/ast/tutorial/basics-output.json +++ b/tests/fixtures/parser/ast/tutorial/basics-output.json @@ -153,16 +153,52 @@ }, { "type": "HTMLText", - "value": "Hello world!", + "value": "Hello", "range": [ 4, - 16 + 9 ], "loc": { "start": { "line": 1, "column": 4 }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "world!", + "range": [ + 10, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, "end": { "line": 1, "column": 16 diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-output.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-output.json index 24b404d9..b577d95f 100644 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-output.json +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-output.json @@ -1471,16 +1471,232 @@ }, { "type": "HTMLText", - "value": "\n\tYes! Send me regular email spam\n", + "value": "\n\t", "range": [ 87, - 121 + 89 ], "loc": { "start": { "line": 6, "column": 41 }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Yes!", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "Send", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "me", + "range": [ + 99, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "regular", + "range": [ + 102, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "email", + "range": [ + 110, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "spam", + "range": [ + 116, + 120 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, "end": { "line": 8, "column": 0 @@ -1536,382 +1752,1210 @@ "column": 2 }, "end": { - "line": 8, - "column": 7 + "line": 8, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 128, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 129, + 131 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 10, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "MustacheKeyword", + "value": "#if", + "range": [ + 132, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "yes", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": "Thank", + "range": [ + 145, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "you.", + "range": [ + 151, + 155 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 155, + 156 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "We", + "range": [ + 156, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 158, + 159 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "will", + "range": [ + 159, + 163 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "bombard", + "range": [ + 164, + 171 + ], + "loc": { + "start": { + "line": 11, + "column": 23 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 171, + 172 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "your", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 11, + "column": 31 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 35 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": "inbox", + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 36 + }, + "end": { + "line": 11, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 11, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 183, + 186 + ], + "loc": { + "start": { + "line": 11, + "column": 42 + }, + "end": { + "line": 11, + "column": 45 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 11, + "column": 45 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + { + "type": "HTMLText", + "value": "sell", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 11, + "column": 46 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 191, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 51 + } + } + }, + { + "type": "HTMLText", + "value": "your", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 51 + }, + "end": { + "line": 11, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 196, + 197 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 56 + } + } + }, + { + "type": "HTMLText", + "value": "personal", + "range": [ + 197, + 205 + ], + "loc": { + "start": { + "line": 11, + "column": 56 + }, + "end": { + "line": 11, + "column": 64 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 11, + "column": 64 + }, + "end": { + "line": 11, + "column": 65 + } + } + }, + { + "type": "HTMLText", + "value": "details.", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 11, + "column": 65 + }, + "end": { + "line": 11, + "column": 73 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 214, + 215 + ], + "loc": { + "start": { + "line": 11, + "column": 73 + }, + "end": { + "line": 11, + "column": 74 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 11, + "column": 74 + }, + "end": { + "line": 11, + "column": 75 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 216, + 217 + ], + "loc": { + "start": { + "line": 11, + "column": 75 + }, + "end": { + "line": 11, + "column": 76 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 217, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 76 + }, + "end": { + "line": 11, + "column": 77 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 219, + 220 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "MustacheKeyword", + "value": ":else", + "range": [ + 220, + 225 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 228, + 229 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": "You", + "range": [ + 231, + 234 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 234, + 235 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "must", + "range": [ + 235, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 239, + 240 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "opt", "range": [ - 128, - 129 + 240, + 243 ], "loc": { "start": { - "line": 8, - "column": 7 + "line": 13, + "column": 13 }, "end": { - "line": 8, - "column": 8 + "line": 13, + "column": 16 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": " ", "range": [ - 129, - 131 + 243, + 244 ], "loc": { "start": { - "line": 8, - "column": 8 + "line": 13, + "column": 16 }, "end": { - "line": 10, - "column": 0 + "line": 13, + "column": 17 } } }, { - "type": "Punctuator", - "value": "{", + "type": "HTMLText", + "value": "in", "range": [ - 131, - 132 + 244, + 246 ], "loc": { "start": { - "line": 10, - "column": 0 + "line": 13, + "column": 17 }, "end": { - "line": 10, - "column": 1 + "line": 13, + "column": 19 } } }, { - "type": "MustacheKeyword", - "value": "#if", + "type": "HTMLText", + "value": " ", "range": [ - 132, - 135 + 246, + 247 ], "loc": { "start": { - "line": 10, - "column": 1 + "line": 13, + "column": 19 }, "end": { - "line": 10, - "column": 4 + "line": 13, + "column": 20 } } }, { - "type": "Identifier", - "value": "yes", + "type": "HTMLText", + "value": "to", "range": [ - 136, - 139 + 247, + 249 ], "loc": { "start": { - "line": 10, - "column": 5 + "line": 13, + "column": 20 }, "end": { - "line": 10, - "column": 8 + "line": 13, + "column": 22 } } }, { - "type": "Punctuator", - "value": "}", + "type": "HTMLText", + "value": " ", "range": [ - 139, - 140 + 249, + 250 ], "loc": { "start": { - "line": 10, - "column": 8 + "line": 13, + "column": 22 }, "end": { - "line": 10, - "column": 9 + "line": 13, + "column": 23 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "continue.", "range": [ - 142, - 143 + 250, + 259 ], "loc": { "start": { - "line": 11, - "column": 1 + "line": 13, + "column": 23 }, "end": { - "line": 11, - "column": 2 + "line": 13, + "column": 32 } } }, { - "type": "HTMLIdentifier", - "value": "p", + "type": "HTMLText", + "value": " ", "range": [ - 143, - 144 + 259, + 260 ], "loc": { "start": { - "line": 11, - "column": 2 + "line": 13, + "column": 32 }, "end": { - "line": 11, - "column": 3 + "line": 13, + "column": 33 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "If", "range": [ - 144, - 145 + 260, + 262 ], "loc": { "start": { - "line": 11, - "column": 3 + "line": 13, + "column": 33 }, "end": { - "line": 11, - "column": 4 + "line": 13, + "column": 35 } } }, { "type": "HTMLText", - "value": "Thank you. We will bombard your inbox and sell your personal details.", + "value": " ", "range": [ - 145, - 214 + 262, + 263 ], "loc": { "start": { - "line": 11, - "column": 4 + "line": 13, + "column": 35 }, "end": { - "line": 11, - "column": 73 + "line": 13, + "column": 36 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "you're", "range": [ - 214, - 215 + 263, + 269 ], "loc": { "start": { - "line": 11, - "column": 73 + "line": 13, + "column": 36 }, "end": { - "line": 11, - "column": 74 + "line": 13, + "column": 42 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": " ", "range": [ - 215, - 216 + 269, + 270 ], "loc": { "start": { - "line": 11, - "column": 74 + "line": 13, + "column": 42 }, "end": { - "line": 11, - "column": 75 + "line": 13, + "column": 43 } } }, { - "type": "HTMLIdentifier", - "value": "p", + "type": "HTMLText", + "value": "not", "range": [ - 216, - 217 + 270, + 273 ], "loc": { "start": { - "line": 11, - "column": 75 + "line": 13, + "column": 43 }, "end": { - "line": 11, - "column": 76 + "line": 13, + "column": 46 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": " ", "range": [ - 217, - 218 + 273, + 274 ], "loc": { "start": { - "line": 11, - "column": 76 + "line": 13, + "column": 46 }, "end": { - "line": 11, - "column": 77 + "line": 13, + "column": 47 } } }, { - "type": "Punctuator", - "value": "{", + "type": "HTMLText", + "value": "paying,", "range": [ - 219, - 220 + 274, + 281 ], "loc": { "start": { - "line": 12, - "column": 0 + "line": 13, + "column": 47 }, "end": { - "line": 12, - "column": 1 + "line": 13, + "column": 54 } } }, { - "type": "MustacheKeyword", - "value": ":else", + "type": "HTMLText", + "value": " ", "range": [ - 220, - 225 + 281, + 282 ], "loc": { "start": { - "line": 12, - "column": 1 + "line": 13, + "column": 54 }, "end": { - "line": 12, - "column": 6 + "line": 13, + "column": 55 } } }, { - "type": "Punctuator", - "value": "}", + "type": "HTMLText", + "value": "you're", "range": [ - 225, - 226 + 282, + 288 ], "loc": { "start": { - "line": 12, - "column": 6 + "line": 13, + "column": 55 }, "end": { - "line": 12, - "column": 7 + "line": 13, + "column": 61 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": " ", "range": [ - 228, - 229 + 288, + 289 ], "loc": { "start": { "line": 13, - "column": 1 + "column": 61 }, "end": { "line": 13, - "column": 2 + "column": 62 } } }, { - "type": "HTMLIdentifier", - "value": "p", + "type": "HTMLText", + "value": "the", "range": [ - 229, - 230 + 289, + 292 ], "loc": { "start": { "line": 13, - "column": 2 + "column": 62 }, "end": { "line": 13, - "column": 3 + "column": 65 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": " ", "range": [ - 230, - 231 + 292, + 293 ], "loc": { "start": { "line": 13, - "column": 3 + "column": 65 }, "end": { "line": 13, - "column": 4 + "column": 66 } } }, { "type": "HTMLText", - "value": "You must opt in to continue. If you're not paying, you're the product.", + "value": "product.", "range": [ - 231, + 293, 301 ], "loc": { "start": { "line": 13, - "column": 4 + "column": 66 }, "end": { "line": 13, @@ -2227,16 +3271,52 @@ }, { "type": "HTMLText", - "value": "\n\tSubscribe\n", + "value": "\n\t", "range": [ 337, - 349 + 339 ], "loc": { "start": { "line": 16, "column": 24 }, + "end": { + "line": 17, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Subscribe", + "range": [ + 339, + 348 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, "end": { "line": 18, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-output.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-output.json index 3b909bb0..7c5e8b0d 100644 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-output.json +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-output.json @@ -1571,16 +1571,52 @@ }, { "type": "HTMLText", - "value": "\n\tbig\n", + "value": "\n\t", "range": [ 134, - 140 + 136 ], "loc": { "start": { "line": 12, "column": 41 }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "big", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, "end": { "line": 14, "column": 0 @@ -1787,16 +1823,52 @@ }, { "type": "HTMLText", - "value": "\n\tsome ", + "value": "\n\t", "range": [ 165, - 172 + 167 ], "loc": { "start": { "line": 16, "column": 15 }, + "end": { + "line": 17, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "some", + "range": [ + 167, + 171 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 171, + 172 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, "end": { "line": 17, "column": 6 @@ -1931,16 +2003,52 @@ }, { "type": "HTMLText", - "value": " text\n", + "value": " ", "range": [ 195, - 201 + 196 ], "loc": { "start": { "line": 17, "column": 29 }, + "end": { + "line": 17, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "text", + "range": [ + 196, + 200 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 200, + 201 + ], + "loc": { + "start": { + "line": 17, + "column": 34 + }, "end": { "line": 18, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-output.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-output.json index b229eeae..73389105 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-output.json @@ -2082,16 +2082,34 @@ }, { "type": "HTMLText", - "value": "color: ", + "value": "color:", "range": [ 207, - 214 + 213 ], "loc": { "start": { "line": 12, "column": 11 }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, "end": { "line": 12, "column": 18 diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-output.json b/tests/fixtures/parser/ast/tutorial/component-events02-output.json index d126ab62..81beb90b 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events02-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-events02-output.json @@ -1537,16 +1537,160 @@ }, { "type": "HTMLText", - "value": "\n\tClick to say hello\n", + "value": "\n\t", "range": [ 216, - 237 + 218 ], "loc": { "start": { "line": 13, "column": 28 }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Click", + "range": [ + 218, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 223, + 224 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 224, + 226 + ], + "loc": { + "start": { + "line": 14, + "column": 7 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 226, + 227 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "say", + "range": [ + 227, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "hello", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 236, + 237 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, "end": { "line": 15, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-output.json b/tests/fixtures/parser/ast/tutorial/congratulations-output.json index 5f96bfac..e30ee485 100644 --- a/tests/fixtures/parser/ast/tutorial/congratulations-output.json +++ b/tests/fixtures/parser/ast/tutorial/congratulations-output.json @@ -7237,16 +7237,34 @@ }, { "type": "HTMLText", - "value": "left: ", + "value": "left:", "range": [ 782, - 788 + 787 ], "loc": { "start": { "line": 48, "column": 14 }, + "end": { + "line": 48, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 787, + 788 + ], + "loc": { + "start": { + "line": 48, + "column": 19 + }, "end": { "line": 48, "column": 20 @@ -7345,16 +7363,70 @@ }, { "type": "HTMLText", - "value": "%; top: ", + "value": "%;", "range": [ 793, - 801 + 795 ], "loc": { "start": { "line": 48, "column": 25 }, + "end": { + "line": 48, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 795, + 796 + ], + "loc": { + "start": { + "line": 48, + "column": 27 + }, + "end": { + "line": 48, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "top:", + "range": [ + 796, + 800 + ], + "loc": { + "start": { + "line": 48, + "column": 28 + }, + "end": { + "line": 48, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 800, + 801 + ], + "loc": { + "start": { + "line": 48, + "column": 32 + }, "end": { "line": 48, "column": 33 @@ -7453,16 +7525,88 @@ }, { "type": "HTMLText", - "value": "%; transform: scale(", + "value": "%;", "range": [ 806, - 826 + 808 ], "loc": { "start": { "line": 48, "column": 38 }, + "end": { + "line": 48, + "column": 40 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 808, + 809 + ], + "loc": { + "start": { + "line": 48, + "column": 40 + }, + "end": { + "line": 48, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "transform:", + "range": [ + 809, + 819 + ], + "loc": { + "start": { + "line": 48, + "column": 41 + }, + "end": { + "line": 48, + "column": 51 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 819, + 820 + ], + "loc": { + "start": { + "line": 48, + "column": 51 + }, + "end": { + "line": 48, + "column": 52 + } + } + }, + { + "type": "HTMLText", + "value": "scale(", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 48, + "column": 52 + }, "end": { "line": 48, "column": 58 diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-output.json b/tests/fixtures/parser/ast/tutorial/context-api01-output.json index 8ae7469d..7479368e 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api01-output.json +++ b/tests/fixtures/parser/ast/tutorial/context-api01-output.json @@ -3359,16 +3359,88 @@ }, { "type": "HTMLText", - "value": "Svelte Body Shaping", + "value": "Svelte", "range": [ 183, - 202 + 189 ], "loc": { "start": { "line": 7, "column": 49 }, + "end": { + "line": 7, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 55 + }, + "end": { + "line": 7, + "column": 56 + } + } + }, + { + "type": "HTMLText", + "value": "Body", + "range": [ + 190, + 194 + ], + "loc": { + "start": { + "line": 7, + "column": 56 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 194, + 195 + ], + "loc": { + "start": { + "line": 7, + "column": 60 + }, + "end": { + "line": 7, + "column": 61 + } + } + }, + { + "type": "HTMLText", + "value": "Shaping", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, "end": { "line": 7, "column": 68 @@ -3737,16 +3809,124 @@ }, { "type": "HTMLText", - "value": "Svelte Barbershop & Essentials", + "value": "Svelte", "range": [ 255, - 285 + 261 ], "loc": { "start": { "line": 8, "column": 49 }, + "end": { + "line": 8, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 261, + 262 + ], + "loc": { + "start": { + "line": 8, + "column": 55 + }, + "end": { + "line": 8, + "column": 56 + } + } + }, + { + "type": "HTMLText", + "value": "Barbershop", + "range": [ + 262, + 272 + ], + "loc": { + "start": { + "line": 8, + "column": 56 + }, + "end": { + "line": 8, + "column": 66 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 8, + "column": 66 + }, + "end": { + "line": 8, + "column": 67 + } + } + }, + { + "type": "HTMLText", + "value": "&", + "range": [ + 273, + 274 + ], + "loc": { + "start": { + "line": 8, + "column": 67 + }, + "end": { + "line": 8, + "column": 68 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 274, + 275 + ], + "loc": { + "start": { + "line": 8, + "column": 68 + }, + "end": { + "line": 8, + "column": 69 + } + } + }, + { + "type": "HTMLText", + "value": "Essentials", + "range": [ + 275, + 285 + ], + "loc": { + "start": { + "line": 8, + "column": 69 + }, "end": { "line": 8, "column": 79 @@ -4115,16 +4295,88 @@ }, { "type": "HTMLText", - "value": "Svelte Waxing Studio", + "value": "Svelte", "range": [ 337, - 357 + 343 ], "loc": { "start": { "line": 9, "column": 48 }, + "end": { + "line": 9, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 343, + 344 + ], + "loc": { + "start": { + "line": 9, + "column": 54 + }, + "end": { + "line": 9, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": "Waxing", + "range": [ + 344, + 350 + ], + "loc": { + "start": { + "line": 9, + "column": 55 + }, + "end": { + "line": 9, + "column": 61 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 350, + 351 + ], + "loc": { + "start": { + "line": 9, + "column": 61 + }, + "end": { + "line": 9, + "column": 62 + } + } + }, + { + "type": "HTMLText", + "value": "Studio", + "range": [ + 351, + 357 + ], + "loc": { + "start": { + "line": 9, + "column": 62 + }, "end": { "line": 9, "column": 68 @@ -4493,16 +4745,124 @@ }, { "type": "HTMLText", - "value": "Svelte 30 Nutritional Consultants", + "value": "Svelte", "range": [ 409, - 442 + 415 ], "loc": { "start": { "line": 10, "column": 48 }, + "end": { + "line": 10, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 10, + "column": 54 + }, + "end": { + "line": 10, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": "30", + "range": [ + 416, + 418 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 57 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 418, + 419 + ], + "loc": { + "start": { + "line": 10, + "column": 57 + }, + "end": { + "line": 10, + "column": 58 + } + } + }, + { + "type": "HTMLText", + "value": "Nutritional", + "range": [ + 419, + 430 + ], + "loc": { + "start": { + "line": 10, + "column": 58 + }, + "end": { + "line": 10, + "column": 69 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 430, + 431 + ], + "loc": { + "start": { + "line": 10, + "column": 69 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + { + "type": "HTMLText", + "value": "Consultants", + "range": [ + 431, + 442 + ], + "loc": { + "start": { + "line": 10, + "column": 70 + }, "end": { "line": 10, "column": 81 @@ -4871,16 +5231,88 @@ }, { "type": "HTMLText", - "value": "Svelte Brands LLC", + "value": "Svelte", "range": [ 494, - 511 + 500 ], "loc": { "start": { "line": 11, "column": 48 }, + "end": { + "line": 11, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 500, + 501 + ], + "loc": { + "start": { + "line": 11, + "column": 54 + }, + "end": { + "line": 11, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": "Brands", + "range": [ + 501, + 507 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 61 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 507, + 508 + ], + "loc": { + "start": { + "line": 11, + "column": 61 + }, + "end": { + "line": 11, + "column": 62 + } + } + }, + { + "type": "HTMLText", + "value": "LLC", + "range": [ + 508, + 511 + ], + "loc": { + "start": { + "line": 11, + "column": 62 + }, "end": { "line": 11, "column": 65 @@ -5249,16 +5681,88 @@ }, { "type": "HTMLText", - "value": "Svelte Medical Systems", + "value": "Svelte", "range": [ 563, - 585 + 569 ], "loc": { "start": { "line": 12, "column": 48 }, + "end": { + "line": 12, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 569, + 570 + ], + "loc": { + "start": { + "line": 12, + "column": 54 + }, + "end": { + "line": 12, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": "Medical", + "range": [ + 570, + 577 + ], + "loc": { + "start": { + "line": 12, + "column": 55 + }, + "end": { + "line": 12, + "column": 62 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 577, + 578 + ], + "loc": { + "start": { + "line": 12, + "column": 62 + }, + "end": { + "line": 12, + "column": 63 + } + } + }, + { + "type": "HTMLText", + "value": "Systems", + "range": [ + 578, + 585 + ], + "loc": { + "start": { + "line": 12, + "column": 63 + }, "end": { "line": 12, "column": 70 diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-output.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-output.json index c70219ce..cfb1ed40 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-output.json @@ -4193,16 +4193,52 @@ }, { "type": "HTMLText", - "value": "\n\tvisible\n", + "value": "\n\t", "range": [ 566, - 576 + 568 ], "loc": { "start": { "line": 41, "column": 47 }, + "end": { + "line": 42, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "visible", + "range": [ + 568, + 575 + ], + "loc": { + "start": { + "line": 42, + "column": 1 + }, + "end": { + "line": 42, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 575, + 576 + ], + "loc": { + "start": { + "line": 42, + "column": 8 + }, "end": { "line": 43, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-output.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-output.json index dc5825f3..19aab025 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-output.json @@ -4733,16 +4733,52 @@ }, { "type": "HTMLText", - "value": "\n\tvisible\n", + "value": "\n\t", "range": [ 713, - 723 + 715 ], "loc": { "start": { "line": 41, "column": 47 }, + "end": { + "line": 42, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "visible", + "range": [ + 715, + 722 + ], + "loc": { + "start": { + "line": 42, + "column": 1 + }, + "end": { + "line": 42, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 722, + 723 + ], + "loc": { + "start": { + "line": 42, + "column": 8 + }, "end": { "line": 43, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-output.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-output.json index b81f4aa4..6d2b978d 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-output.json @@ -4775,16 +4775,52 @@ }, { "type": "HTMLText", - "value": "\n\tvisible\n", + "value": "\n\t", "range": [ 568, - 578 + 570 ], "loc": { "start": { "line": 28, "column": 47 }, + "end": { + "line": 29, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "visible", + "range": [ + 570, + 577 + ], + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 577, + 578 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, "end": { "line": 30, "column": 0 @@ -5063,16 +5099,340 @@ }, { "type": "HTMLText", - "value": "\n\t\tThe quick brown fox jumps over the lazy dog\n\t", + "value": "\n\t\t", "range": [ 620, - 668 + 623 ], "loc": { "start": { "line": 33, "column": 18 }, + "end": { + "line": 34, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 623, + 626 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 34, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 626, + 627 + ], + "loc": { + "start": { + "line": 34, + "column": 5 + }, + "end": { + "line": 34, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "quick", + "range": [ + 627, + 632 + ], + "loc": { + "start": { + "line": 34, + "column": 6 + }, + "end": { + "line": 34, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 632, + 633 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "brown", + "range": [ + 633, + 638 + ], + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 638, + 639 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "fox", + "range": [ + 639, + 642 + ], + "loc": { + "start": { + "line": 34, + "column": 18 + }, + "end": { + "line": 34, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 642, + 643 + ], + "loc": { + "start": { + "line": 34, + "column": 21 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "jumps", + "range": [ + 643, + 648 + ], + "loc": { + "start": { + "line": 34, + "column": 22 + }, + "end": { + "line": 34, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 648, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 27 + }, + "end": { + "line": 34, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "over", + "range": [ + 649, + 653 + ], + "loc": { + "start": { + "line": 34, + "column": 28 + }, + "end": { + "line": 34, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 653, + 654 + ], + "loc": { + "start": { + "line": 34, + "column": 32 + }, + "end": { + "line": 34, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 654, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 33 + }, + "end": { + "line": 34, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 657, + 658 + ], + "loc": { + "start": { + "line": 34, + "column": 36 + }, + "end": { + "line": 34, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "lazy", + "range": [ + 658, + 662 + ], + "loc": { + "start": { + "line": 34, + "column": 37 + }, + "end": { + "line": 34, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 662, + 663 + ], + "loc": { + "start": { + "line": 34, + "column": 41 + }, + "end": { + "line": 34, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "dog", + "range": [ + 663, + 666 + ], + "loc": { + "start": { + "line": 34, + "column": 42 + }, + "end": { + "line": 34, + "column": 45 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 666, + 668 + ], + "loc": { + "start": { + "line": 34, + "column": 45 + }, "end": { "line": 35, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-output.json b/tests/fixtures/parser/ast/tutorial/custom-stores-output.json index 8332df3e..6122f6ca 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-output.json @@ -1301,16 +1301,106 @@ }, { "type": "HTMLText", - "value": "The count is ", + "value": "The", "range": [ 62, - 75 + 65 ], "loc": { "start": { "line": 5, "column": 4 }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "count", + "range": [ + 66, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 72, + 74 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, "end": { "line": 5, "column": 17 diff --git a/tests/fixtures/parser/ast/tutorial/debug01-output.json b/tests/fixtures/parser/ast/tutorial/debug01-output.json index 2d683957..816fcc13 100644 --- a/tests/fixtures/parser/ast/tutorial/debug01-output.json +++ b/tests/fixtures/parser/ast/tutorial/debug01-output.json @@ -1886,16 +1886,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 172, - 178 + 177 ], "loc": { "start": { "line": 13, "column": 4 }, + "end": { + "line": 13, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, "end": { "line": 13, "column": 10 diff --git a/tests/fixtures/parser/ast/tutorial/debug02-output.json b/tests/fixtures/parser/ast/tutorial/debug02-output.json index a2950522..710651d1 100644 --- a/tests/fixtures/parser/ast/tutorial/debug02-output.json +++ b/tests/fixtures/parser/ast/tutorial/debug02-output.json @@ -1940,16 +1940,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 177, - 183 + 182 ], "loc": { "start": { "line": 13, "column": 4 }, + "end": { + "line": 13, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, "end": { "line": 13, "column": 10 diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-output.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-output.json index 7f91dd12..ea3b6e3e 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-output.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-output.json @@ -571,16 +571,106 @@ }, { "type": "HTMLText", - "value": "The answer is ", + "value": "The", "range": [ 43, - 57 + 46 ], "loc": { "start": { "line": 5, "column": 3 }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "answer", + "range": [ + 47, + 53 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 54, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, "end": { "line": 5, "column": 17 diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-output.json b/tests/fixtures/parser/ast/tutorial/default-values02-output.json index 2e337fd6..777655ed 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values02-output.json +++ b/tests/fixtures/parser/ast/tutorial/default-values02-output.json @@ -625,16 +625,106 @@ }, { "type": "HTMLText", - "value": "The answer is ", + "value": "The", "range": [ 57, - 71 + 60 ], "loc": { "start": { "line": 5, "column": 3 }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "answer", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 68, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, "end": { "line": 5, "column": 17 diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-output.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-output.json index e9488c46..b5abe963 100644 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-output.json +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-output.json @@ -13808,16 +13808,160 @@ }, { "type": "HTMLText", - "value": "what needs to be done?", + "value": "what", "range": [ 1255, - 1277 + 1259 ], "loc": { "start": { "line": 58, "column": 15 }, + "end": { + "line": 58, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1259, + 1260 + ], + "loc": { + "start": { + "line": 58, + "column": 19 + }, + "end": { + "line": 58, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "needs", + "range": [ + 1260, + 1265 + ], + "loc": { + "start": { + "line": 58, + "column": 20 + }, + "end": { + "line": 58, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1265, + 1266 + ], + "loc": { + "start": { + "line": 58, + "column": 25 + }, + "end": { + "line": 58, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 1266, + 1268 + ], + "loc": { + "start": { + "line": 58, + "column": 26 + }, + "end": { + "line": 58, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1268, + 1269 + ], + "loc": { + "start": { + "line": 58, + "column": 28 + }, + "end": { + "line": 58, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "be", + "range": [ + 1269, + 1271 + ], + "loc": { + "start": { + "line": 58, + "column": 29 + }, + "end": { + "line": 58, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1271, + 1272 + ], + "loc": { + "start": { + "line": 58, + "column": 31 + }, + "end": { + "line": 58, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "done?", + "range": [ + 1272, + 1277 + ], + "loc": { + "start": { + "line": 58, + "column": 32 + }, "end": { "line": 58, "column": 37 diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-output.json b/tests/fixtures/parser/ast/tutorial/derived-stores-output.json index 9ebd6328..96c027e0 100644 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-output.json +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-output.json @@ -2036,16 +2036,106 @@ }, { "type": "HTMLText", - "value": "The time is ", + "value": "The", "range": [ 203, - 215 + 206 ], "loc": { "start": { "line": 12, "column": 4 }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 206, + 207 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "time", + "range": [ + 207, + 211 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 211, + 212 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 212, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 214, + 215 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, "end": { "line": 12, "column": 16 @@ -2342,16 +2432,232 @@ }, { "type": "HTMLText", - "value": "\n\tThis page has been open for\n\t", + "value": "\n\t", "range": [ 250, - 281 + 252 ], "loc": { "start": { "line": 14, "column": 3 }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "This", + "range": [ + 252, + 256 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 256, + 257 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "page", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 261, + 262 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "has", + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "been", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "open", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "for", + "range": [ + 276, + 279 + ], + "loc": { + "start": { + "line": 15, + "column": 25 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 279, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 28 + }, "end": { "line": 16, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-output.json b/tests/fixtures/parser/ast/tutorial/dimensions-output.json index cbb187f6..ac22f500 100644 --- a/tests/fixtures/parser/ast/tutorial/dimensions-output.json +++ b/tests/fixtures/parser/ast/tutorial/dimensions-output.json @@ -2611,16 +2611,34 @@ }, { "type": "HTMLText", - "value": "size: ", + "value": "size:", "range": [ 252, - 258 + 257 ], "loc": { "start": { "line": 17, "column": 3 }, + "end": { + "line": 17, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, "end": { "line": 17, "column": 9 @@ -2683,16 +2701,70 @@ }, { "type": "HTMLText", - "value": "px x ", + "value": "px", "range": [ 261, - 266 + 263 ], "loc": { "start": { "line": 17, "column": 12 }, + "end": { + "line": 17, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 263, + 264 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 264, + 265 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, "end": { "line": 17, "column": 17 @@ -3277,16 +3349,34 @@ }, { "type": "HTMLText", - "value": "font-size: ", + "value": "font-size:", "range": [ 340, - 351 + 350 ], "loc": { "start": { "line": 20, "column": 14 }, + "end": { + "line": 20, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 350, + 351 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, "end": { "line": 20, "column": 25 diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-output.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-output.json index e4586052..248d4a4b 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-output.json @@ -534,16 +534,88 @@ }, { "type": "HTMLText", - "value": "\n\tClick me\n", + "value": "\n\t", "range": [ 402, - 413 + 404 ], "loc": { "start": { "line": 20, "column": 17 }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Click", + "range": [ + 404, + 409 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 409, + 410 + ], + "loc": { + "start": { + "line": 21, + "column": 6 + }, + "end": { + "line": 21, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "me", + "range": [ + 410, + 412 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 412, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, "end": { "line": 22, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-output.json b/tests/fixtures/parser/ast/tutorial/dom-events-output.json index e7c5c293..ecefadf2 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-events-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-events-output.json @@ -2245,16 +2245,160 @@ }, { "type": "HTMLText", - "value": "\n\tThe mouse position is ", + "value": "\n\t", "range": [ 220, - 244 + 222 ], "loc": { "start": { "line": 14, "column": 36 }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 222, + 225 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "mouse", + "range": [ + 226, + 231 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "position", + "range": [ + 232, + 240 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 240, + 241 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 241, + 243 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 243, + 244 + ], + "loc": { + "start": { + "line": 15, + "column": 22 + }, "end": { "line": 15, "column": 23 @@ -2353,16 +2497,52 @@ }, { "type": "HTMLText", - "value": " x ", + "value": " ", "range": [ 249, - 252 + 250 ], "loc": { "start": { "line": 15, "column": 28 }, + "end": { + "line": 15, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 250, + 251 + ], + "loc": { + "start": { + "line": 15, + "column": 29 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 15, + "column": 30 + }, "end": { "line": 15, "column": 31 diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-output.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-output.json index 3dd00ac6..4a759a96 100644 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-output.json +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-output.json @@ -1418,16 +1418,88 @@ }, { "type": "HTMLText", - "value": "A man dances.", + "value": "A", "range": [ 95, - 108 + 96 ], "loc": { "start": { "line": 7, "column": 20 }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "man", + "range": [ + 97, + 100 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "dances.", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, "end": { "line": 7, "column": 33 @@ -1634,16 +1706,88 @@ }, { "type": "HTMLText", - "value": "A man dances.", + "value": "A", "range": [ 127, - 140 + 128 ], "loc": { "start": { "line": 8, "column": 16 }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 128, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "man", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "dances.", + "range": [ + 133, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, "end": { "line": 8, "column": 29 diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-output.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-output.json index d8144fdd..af08e8bc 100644 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-output.json @@ -5903,16 +5903,160 @@ }, { "type": "HTMLText", - "value": "What needs to be done?", + "value": "What", "range": [ 560, - 582 + 564 ], "loc": { "start": { "line": 35, "column": 16 }, + "end": { + "line": 35, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 564, + 565 + ], + "loc": { + "start": { + "line": 35, + "column": 20 + }, + "end": { + "line": 35, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "needs", + "range": [ + 565, + 570 + ], + "loc": { + "start": { + "line": 35, + "column": 21 + }, + "end": { + "line": 35, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 570, + 571 + ], + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 571, + 573 + ], + "loc": { + "start": { + "line": 35, + "column": 27 + }, + "end": { + "line": 35, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 573, + 574 + ], + "loc": { + "start": { + "line": 35, + "column": 29 + }, + "end": { + "line": 35, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "be", + "range": [ + 574, + 576 + ], + "loc": { + "start": { + "line": 35, + "column": 30 + }, + "end": { + "line": 35, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 576, + 577 + ], + "loc": { + "start": { + "line": 35, + "column": 32 + }, + "end": { + "line": 35, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "done?", + "range": [ + 577, + 582 + ], + "loc": { + "start": { + "line": 35, + "column": 33 + }, "end": { "line": 35, "column": 38 @@ -6389,16 +6533,34 @@ }, { "type": "HTMLText", - "value": " remaining", + "value": " ", "range": [ 645, - 655 + 646 ], "loc": { "start": { "line": 41, "column": 14 }, + "end": { + "line": 41, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "remaining", + "range": [ + 646, + 655 + ], + "loc": { + "start": { + "line": 41, + "column": 15 + }, "end": { "line": 41, "column": 24 @@ -6677,16 +6839,88 @@ }, { "type": "HTMLText", - "value": "\n\tAdd new\n", + "value": "\n\t", "range": [ 684, - 694 + 686 ], "loc": { "start": { "line": 43, "column": 23 }, + "end": { + "line": 44, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Add", + "range": [ + 686, + 689 + ], + "loc": { + "start": { + "line": 44, + "column": 1 + }, + "end": { + "line": 44, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 689, + 690 + ], + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 44, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "new", + "range": [ + 690, + 693 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 693, + 694 + ], + "loc": { + "start": { + "line": 44, + "column": 8 + }, "end": { "line": 45, "column": 0 @@ -6965,16 +7199,88 @@ }, { "type": "HTMLText", - "value": "\n\tClear completed\n", + "value": "\n\t", "range": [ 730, - 748 + 732 ], "loc": { "start": { "line": 47, "column": 25 }, + "end": { + "line": 48, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Clear", + "range": [ + 732, + 737 + ], + "loc": { + "start": { + "line": 48, + "column": 1 + }, + "end": { + "line": 48, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 737, + 738 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "completed", + "range": [ + 738, + 747 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 747, + 748 + ], + "loc": { + "start": { + "line": 48, + "column": 16 + }, "end": { "line": 49, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-output.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-output.json index 6596f2c4..6316a4db 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-output.json @@ -2126,16 +2126,160 @@ }, { "type": "HTMLText", - "value": "The Famous Cats of YouTube", + "value": "The", "range": [ 187, - 213 + 190 ], "loc": { "start": { "line": 9, "column": 4 }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "Famous", + "range": [ + 191, + 197 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 197, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "Cats", + "range": [ + 198, + 202 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "of", + "range": [ + 203, + 205 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "YouTube", + "range": [ + 206, + 213 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, "end": { "line": 9, "column": 30 diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-output.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-output.json index df7e0f34..d4609f7e 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-output.json @@ -2234,16 +2234,160 @@ }, { "type": "HTMLText", - "value": "The Famous Cats of YouTube", + "value": "The", "range": [ 187, - 213 + 190 ], "loc": { "start": { "line": 9, "column": 4 }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "Famous", + "range": [ + 191, + 197 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 197, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "Cats", + "range": [ + 198, + 202 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "of", + "range": [ + 203, + 205 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "YouTube", + "range": [ + 206, + 213 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, "end": { "line": 9, "column": 30 @@ -3044,16 +3188,34 @@ }, { "type": "HTMLText", - "value": ": ", + "value": ":", "range": [ 333, - 335 + 334 ], "loc": { "start": { "line": 14, "column": 10 }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, "end": { "line": 14, "column": 12 diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-output.json b/tests/fixtures/parser/ast/tutorial/else-blocks-output.json index 8a97a419..095cc0f5 100644 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-output.json @@ -1740,16 +1740,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tLog out\n\t", + "value": "\n\t\t", "range": [ 159, - 171 + 162 ], "loc": { "start": { "line": 10, "column": 27 }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Log", + "range": [ + 162, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 169, + 171 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, "end": { "line": 12, "column": 1 @@ -2064,16 +2136,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tLog in\n\t", + "value": "\n\t\t", "range": [ 216, - 227 + 219 ], "loc": { "start": { "line": 14, "column": 27 }, + "end": { + "line": 15, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Log", + "range": [ + 219, + 222 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 222, + 223 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 223, + 225 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 225, + 227 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, "end": { "line": 16, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-output.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-output.json index 04242508..2d7476fe 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-output.json @@ -1194,16 +1194,142 @@ }, { "type": "HTMLText", - "value": " is greater than 10", + "value": " ", "range": [ 52, - 71 + 53 ], "loc": { "start": { "line": 6, "column": 7 }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 53, + 55 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "greater", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "than", + "range": [ + 64, + 68 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "10", + "range": [ + 69, + 71 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, "end": { "line": 6, "column": 26 @@ -1554,16 +1680,142 @@ }, { "type": "HTMLText", - "value": " is less than 5", + "value": " ", "range": [ 105, - 120 + 106 ], "loc": { "start": { "line": 9, "column": 8 }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 108, + 109 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "less", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "than", + "range": [ + 114, + 118 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 118, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "5", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, "end": { "line": 9, "column": 23 @@ -1806,16 +2058,178 @@ }, { "type": "HTMLText", - "value": " is between 5 and 10", + "value": " ", "range": [ 142, - 162 + 143 ], "loc": { "start": { "line": 11, "column": 8 }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 143, + 145 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "between", + "range": [ + 146, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "5", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 155, + 156 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 156, + 159 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "10", + "range": [ + 160, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 26 + }, "end": { "line": 11, "column": 28 diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-output.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-output.json index 4497df92..e275e82f 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-output.json @@ -1194,16 +1194,142 @@ }, { "type": "HTMLText", - "value": " is greater than 10", + "value": " ", "range": [ 52, - 71 + 53 ], "loc": { "start": { "line": 6, "column": 7 }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 53, + 55 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "greater", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "than", + "range": [ + 64, + 68 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "10", + "range": [ + 69, + 71 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, "end": { "line": 6, "column": 26 @@ -1518,16 +1644,142 @@ }, { "type": "HTMLText", - "value": " is less than 5", + "value": " ", "range": [ 100, - 115 + 101 ], "loc": { "start": { "line": 8, "column": 7 }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 101, + 103 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "less", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 108, + 109 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "than", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "5", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, "end": { "line": 8, "column": 22 @@ -1770,16 +2022,178 @@ }, { "type": "HTMLText", - "value": " is between 5 and 10", + "value": " ", "range": [ 135, - 155 + 136 ], "loc": { "start": { "line": 10, "column": 7 }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 136, + 138 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "between", + "range": [ + 139, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "5", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 148, + 149 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 149, + 152 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "10", + "range": [ + 153, + 155 + ], + "loc": { + "start": { + "line": 10, + "column": 25 + }, "end": { "line": 10, "column": 27 diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-output.json index d126ab62..81beb90b 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-output.json @@ -1537,16 +1537,160 @@ }, { "type": "HTMLText", - "value": "\n\tClick to say hello\n", + "value": "\n\t", "range": [ 216, - 237 + 218 ], "loc": { "start": { "line": 13, "column": 28 }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Click", + "range": [ + 218, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 223, + 224 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 224, + 226 + ], + "loc": { + "start": { + "line": 14, + "column": 7 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 226, + 227 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "say", + "range": [ + 227, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "hello", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 236, + 237 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, "end": { "line": 15, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-output.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-output.json index 54b16e0a..fb0f8ea3 100644 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-output.json @@ -937,16 +937,88 @@ }, { "type": "HTMLText", - "value": "\n\tClick me\n", + "value": "\n\t", "range": [ 111, - 122 + 113 ], "loc": { "start": { "line": 7, "column": 36 }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Click", + "range": [ + 113, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 118, + 119 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "me", + "range": [ + 119, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, "end": { "line": 9, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-output.json b/tests/fixtures/parser/ast/tutorial/group-inputs-output.json index 444e0d64..f40b237d 100644 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-output.json +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-output.json @@ -5793,16 +5793,88 @@ }, { "type": "HTMLText", - "value": "\n\tOne scoop\n", + "value": "\n\t", "range": [ 392, - 404 + 394 ], "loc": { "start": { "line": 19, "column": 49 }, + "end": { + "line": 20, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "One", + "range": [ + 394, + 397 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 397, + 398 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "scoop", + "range": [ + 398, + 403 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 403, + 404 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, "end": { "line": 21, "column": 0 @@ -6297,16 +6369,88 @@ }, { "type": "HTMLText", - "value": "\n\tTwo scoops\n", + "value": "\n\t", "range": [ 471, - 484 + 473 ], "loc": { "start": { "line": 24, "column": 49 }, + "end": { + "line": 25, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Two", + "range": [ + 473, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "scoops", + "range": [ + 477, + 483 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 483, + 484 + ], + "loc": { + "start": { + "line": 25, + "column": 11 + }, "end": { "line": 26, "column": 0 @@ -6801,16 +6945,88 @@ }, { "type": "HTMLText", - "value": "\n\tThree scoops\n", + "value": "\n\t", "range": [ 551, - 566 + 553 ], "loc": { "start": { "line": 29, "column": 49 }, + "end": { + "line": 30, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Three", + "range": [ + 553, + 558 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 558, + 559 + ], + "loc": { + "start": { + "line": 30, + "column": 6 + }, + "end": { + "line": 30, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "scoops", + "range": [ + 559, + 565 + ], + "loc": { + "start": { + "line": 30, + "column": 7 + }, + "end": { + "line": 30, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 565, + 566 + ], + "loc": { + "start": { + "line": 30, + "column": 13 + }, "end": { "line": 31, "column": 0 @@ -8007,10 +8223,10 @@ }, { "type": "HTMLText", - "value": "Please select at least one flavour", + "value": "Please", "range": [ 753, - 787 + 759 ], "loc": { "start": { @@ -8019,141 +8235,321 @@ }, "end": { "line": 43, - "column": 38 + "column": 10 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": " ", "range": [ - 787, - 788 + 759, + 760 ], "loc": { "start": { "line": 43, - "column": 38 + "column": 10 }, "end": { "line": 43, - "column": 39 + "column": 11 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": "select", "range": [ - 788, - 789 + 760, + 766 ], "loc": { "start": { "line": 43, - "column": 39 + "column": 11 }, "end": { "line": 43, - "column": 40 + "column": 17 } } }, { - "type": "HTMLIdentifier", - "value": "p", + "type": "HTMLText", + "value": " ", "range": [ - 789, - 790 + 766, + 767 ], "loc": { "start": { "line": 43, - "column": 40 + "column": 17 }, "end": { "line": 43, - "column": 41 + "column": 18 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "at", "range": [ - 790, - 791 + 767, + 769 ], "loc": { "start": { "line": 43, - "column": 41 + "column": 18 }, "end": { "line": 43, - "column": 42 + "column": 20 } } }, { - "type": "Punctuator", - "value": "{", + "type": "HTMLText", + "value": " ", "range": [ - 792, - 793 + 769, + 770 ], "loc": { "start": { - "line": 44, - "column": 0 + "line": 43, + "column": 20 }, "end": { - "line": 44, - "column": 1 + "line": 43, + "column": 21 } } }, { - "type": "MustacheKeyword", - "value": ":else", + "type": "HTMLText", + "value": "least", "range": [ - 793, - 798 + 770, + 775 ], "loc": { "start": { - "line": 44, - "column": 1 + "line": 43, + "column": 21 }, "end": { - "line": 44, - "column": 6 + "line": 43, + "column": 26 } } }, { - "type": "MustacheKeyword", - "value": "if", + "type": "HTMLText", + "value": " ", "range": [ - 799, - 801 + 775, + 776 ], "loc": { "start": { - "line": 44, - "column": 7 + "line": 43, + "column": 26 }, "end": { - "line": 44, - "column": 9 + "line": 43, + "column": 27 } } }, { - "type": "Identifier", - "value": "flavours", + "type": "HTMLText", + "value": "one", "range": [ - 802, + 776, + 779 + ], + "loc": { + "start": { + "line": 43, + "column": 27 + }, + "end": { + "line": 43, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 779, + 780 + ], + "loc": { + "start": { + "line": 43, + "column": 30 + }, + "end": { + "line": 43, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "flavour", + "range": [ + 780, + 787 + ], + "loc": { + "start": { + "line": 43, + "column": 31 + }, + "end": { + "line": 43, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 787, + 788 + ], + "loc": { + "start": { + "line": 43, + "column": 38 + }, + "end": { + "line": 43, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 788, + 789 + ], + "loc": { + "start": { + "line": 43, + "column": 39 + }, + "end": { + "line": 43, + "column": 40 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 789, + 790 + ], + "loc": { + "start": { + "line": 43, + "column": 40 + }, + "end": { + "line": 43, + "column": 41 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 790, + 791 + ], + "loc": { + "start": { + "line": 43, + "column": 41 + }, + "end": { + "line": 43, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 792, + 793 + ], + "loc": { + "start": { + "line": 44, + "column": 0 + }, + "end": { + "line": 44, + "column": 1 + } + } + }, + { + "type": "MustacheKeyword", + "value": ":else", + "range": [ + 793, + 798 + ], + "loc": { + "start": { + "line": 44, + "column": 1 + }, + "end": { + "line": 44, + "column": 6 + } + } + }, + { + "type": "MustacheKeyword", + "value": "if", + "range": [ + 799, + 801 + ], + "loc": { + "start": { + "line": 44, + "column": 7 + }, + "end": { + "line": 44, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "flavours", + "range": [ + 802, 810 ], "loc": { @@ -8313,16 +8709,196 @@ }, { "type": "HTMLText", - "value": "Can't order more flavours than scoops!", + "value": "Can't", "range": [ 832, - 870 + 837 ], "loc": { "start": { "line": 45, "column": 4 }, + "end": { + "line": 45, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 837, + 838 + ], + "loc": { + "start": { + "line": 45, + "column": 9 + }, + "end": { + "line": 45, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "order", + "range": [ + 838, + 843 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 843, + 844 + ], + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "more", + "range": [ + 844, + 848 + ], + "loc": { + "start": { + "line": 45, + "column": 16 + }, + "end": { + "line": 45, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 848, + 849 + ], + "loc": { + "start": { + "line": 45, + "column": 20 + }, + "end": { + "line": 45, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "flavours", + "range": [ + 849, + 857 + ], + "loc": { + "start": { + "line": 45, + "column": 21 + }, + "end": { + "line": 45, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 857, + 858 + ], + "loc": { + "start": { + "line": 45, + "column": 29 + }, + "end": { + "line": 45, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "than", + "range": [ + 858, + 862 + ], + "loc": { + "start": { + "line": 45, + "column": 30 + }, + "end": { + "line": 45, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 862, + 863 + ], + "loc": { + "start": { + "line": 45, + "column": 34 + }, + "end": { + "line": 45, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "scoops!", + "range": [ + 863, + 870 + ], + "loc": { + "start": { + "line": 45, + "column": 35 + }, "end": { "line": 45, "column": 42 @@ -8511,16 +9087,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tYou ordered ", + "value": "\n\t\t", "range": [ 887, - 902 + 890 ], "loc": { "start": { "line": 47, "column": 4 }, + "end": { + "line": 48, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "You", + "range": [ + 890, + 893 + ], + "loc": { + "start": { + "line": 48, + "column": 2 + }, + "end": { + "line": 48, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 893, + 894 + ], + "loc": { + "start": { + "line": 48, + "column": 5 + }, + "end": { + "line": 48, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "ordered", + "range": [ + 894, + 901 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 901, + 902 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, "end": { "line": 48, "column": 14 @@ -8763,16 +9411,52 @@ }, { "type": "HTMLText", - "value": "\n\t\tof ", + "value": "\n\t\t", "range": [ 946, - 952 + 949 ], "loc": { "start": { "line": 48, "column": 58 }, + "end": { + "line": 49, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "of", + "range": [ + 949, + 951 + ], + "loc": { + "start": { + "line": 49, + "column": 2 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 951, + 952 + ], + "loc": { + "start": { + "line": 49, + "column": 4 + }, "end": { "line": 49, "column": 5 diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-output.json b/tests/fixtures/parser/ast/tutorial/if-blocks-output.json index 4604cea2..61dc3cac 100644 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-output.json +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-output.json @@ -1835,16 +1835,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tLog out\n\t", + "value": "\n\t\t", "range": [ 159, - 171 + 162 ], "loc": { "start": { "line": 10, "column": 27 }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Log", + "range": [ + 162, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 169, + 171 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, "end": { "line": 12, "column": 1 @@ -2303,16 +2375,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tLog in\n\t", + "value": "\n\t\t", "range": [ 236, - 247 + 239 ], "loc": { "start": { "line": 16, "column": 27 }, + "end": { + "line": 17, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Log", + "range": [ + 239, + 242 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 242, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 243, + 245 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 245, + 247 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, "end": { "line": 18, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-output.json b/tests/fixtures/parser/ast/tutorial/in-and-out-output.json index b3b0effe..050ecdb5 100644 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-output.json +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-output.json @@ -1748,16 +1748,52 @@ }, { "type": "HTMLText", - "value": "\n\tvisible\n", + "value": "\n\t", "range": [ 144, - 154 + 146 ], "loc": { "start": { "line": 7, "column": 47 }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "visible", + "range": [ + 146, + 153 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, "end": { "line": 9, "column": 0 @@ -2342,16 +2378,160 @@ }, { "type": "HTMLText", - "value": "\n\t\tFlies in and out\n\t", + "value": "\n\t\t", "range": [ 229, - 250 + 232 ], "loc": { "start": { "line": 12, "column": 51 }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Flies", + "range": [ + 232, + 237 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 237, + 238 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 238, + 240 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 240, + 241 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 244, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 248, + 250 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, "end": { "line": 14, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-output.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-output.json index 3d6ffc5d..5f409194 100644 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-output.json +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-output.json @@ -2835,16 +2835,160 @@ }, { "type": "HTMLText", - "value": "\n\tThe mouse position is ", + "value": "\n\t", "range": [ 246, - 270 + 248 ], "loc": { "start": { "line": 14, "column": 62 }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 248, + 251 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "mouse", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "position", + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 267, + 269 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 15, + "column": 22 + }, "end": { "line": 15, "column": 23 @@ -2943,16 +3087,52 @@ }, { "type": "HTMLText", - "value": " x ", + "value": " ", "range": [ 275, - 278 + 276 ], "loc": { "start": { "line": 15, "column": 28 }, + "end": { + "line": 15, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "x", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 15, + "column": 29 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 277, + 278 + ], + "loc": { + "start": { + "line": 15, + "column": 30 + }, "end": { "line": 15, "column": 31 diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-output.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-output.json index 752e070c..fb949090 100644 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-output.json +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-output.json @@ -3263,16 +3263,124 @@ }, { "type": "HTMLText", - "value": "\n\tRemove first thing\n", + "value": "\n\t", "range": [ 318, - 339 + 320 ], "loc": { "start": { "line": 17, "column": 31 }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Remove", + "range": [ + 320, + 326 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 326, + 327 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "first", + "range": [ + 327, + 332 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 332, + 333 + ], + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "thing", + "range": [ + 333, + 338 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 338, + 339 + ], + "loc": { + "start": { + "line": 18, + "column": 19 + }, "end": { "line": 19, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-output.json b/tests/fixtures/parser/ast/tutorial/local-transitions-output.json index 0fdd5a84..b32ff27a 100644 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-output.json +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-output.json @@ -3195,16 +3195,88 @@ }, { "type": "HTMLText", - "value": "\n\tshow list\n", + "value": "\n\t", "range": [ 329, - 341 + 331 ], "loc": { "start": { "line": 17, "column": 49 }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "show", + "range": [ + 331, + 335 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 335, + 336 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "list", + "range": [ + 336, + 340 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 340, + 341 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, "end": { "line": 19, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-output.json b/tests/fixtures/parser/ast/tutorial/media-elements-output.json index a510263e..0ad658ec 100644 --- a/tests/fixtures/parser/ast/tutorial/media-elements-output.json +++ b/tests/fixtures/parser/ast/tutorial/media-elements-output.json @@ -10801,16 +10801,52 @@ }, { "type": "HTMLText", - "value": "Caminandes: Llamigos", + "value": "Caminandes:", "range": [ 2011, - 2031 + 2022 ], "loc": { "start": { "line": 107, "column": 4 }, + "end": { + "line": 107, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2022, + 2023 + ], + "loc": { + "start": { + "line": 107, + "column": 15 + }, + "end": { + "line": 107, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "Llamigos", + "range": [ + 2023, + 2031 + ], + "loc": { + "start": { + "line": 107, + "column": 16 + }, "end": { "line": 107, "column": 24 @@ -10963,16 +10999,34 @@ }, { "type": "HTMLText", - "value": "From ", + "value": "From", "range": [ 2040, - 2045 + 2044 ], "loc": { "start": { "line": 108, "column": 3 }, + "end": { + "line": 108, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2044, + 2045 + ], + "loc": { + "start": { + "line": 108, + "column": 7 + }, "end": { "line": 108, "column": 8 @@ -11125,16 +11179,88 @@ }, { "type": "HTMLText", - "value": "Blender Open Projects", + "value": "Blender", "range": [ 2095, - 2116 + 2102 ], "loc": { "start": { "line": 108, "column": 58 }, + "end": { + "line": 108, + "column": 65 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2102, + 2103 + ], + "loc": { + "start": { + "line": 108, + "column": 65 + }, + "end": { + "line": 108, + "column": 66 + } + } + }, + { + "type": "HTMLText", + "value": "Open", + "range": [ + 2103, + 2107 + ], + "loc": { + "start": { + "line": 108, + "column": 66 + }, + "end": { + "line": 108, + "column": 70 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2107, + 2108 + ], + "loc": { + "start": { + "line": 108, + "column": 70 + }, + "end": { + "line": 108, + "column": 71 + } + } + }, + { + "type": "HTMLText", + "value": "Projects", + "range": [ + 2108, + 2116 + ], + "loc": { + "start": { + "line": 108, + "column": 71 + }, "end": { "line": 108, "column": 79 @@ -11215,16 +11341,52 @@ }, { "type": "HTMLText", - "value": ". CC-BY", + "value": ".", "range": [ 2120, - 2127 + 2121 ], "loc": { "start": { "line": 108, "column": 83 }, + "end": { + "line": 108, + "column": 84 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2121, + 2122 + ], + "loc": { + "start": { + "line": 108, + "column": 84 + }, + "end": { + "line": 108, + "column": 85 + } + } + }, + { + "type": "HTMLText", + "value": "CC-BY", + "range": [ + 2122, + 2127 + ], + "loc": { + "start": { + "line": 108, + "column": 85 + }, "end": { "line": 108, "column": 90 @@ -12565,16 +12727,34 @@ }, { "type": "HTMLText", - "value": "opacity: ", + "value": "opacity:", "range": [ 2472, - 2481 + 2480 ], "loc": { "start": { "line": 122, "column": 30 }, + "end": { + "line": 122, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2480, + 2481 + ], + "loc": { + "start": { + "line": 122, + "column": 38 + }, "end": { "line": 122, "column": 39 @@ -13681,16 +13861,106 @@ }, { "type": "HTMLText", - "value": "click anywhere to ", + "value": "click", "range": [ 2640, - 2658 + 2645 ], "loc": { "start": { "line": 127, "column": 9 }, + "end": { + "line": 127, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2645, + 2646 + ], + "loc": { + "start": { + "line": 127, + "column": 14 + }, + "end": { + "line": 127, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "anywhere", + "range": [ + 2646, + 2654 + ], + "loc": { + "start": { + "line": 127, + "column": 15 + }, + "end": { + "line": 127, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2654, + 2655 + ], + "loc": { + "start": { + "line": 127, + "column": 23 + }, + "end": { + "line": 127, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 2655, + 2657 + ], + "loc": { + "start": { + "line": 127, + "column": 24 + }, + "end": { + "line": 127, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2657, + 2658 + ], + "loc": { + "start": { + "line": 127, + "column": 26 + }, "end": { "line": 127, "column": 27 @@ -13825,16 +14095,142 @@ }, { "type": "HTMLText", - "value": " / drag to seek", + "value": " ", "range": [ 2685, - 2700 + 2686 ], "loc": { "start": { "line": 127, "column": 54 }, + "end": { + "line": 127, + "column": 55 + } + } + }, + { + "type": "HTMLText", + "value": "/", + "range": [ + 2686, + 2687 + ], + "loc": { + "start": { + "line": 127, + "column": 55 + }, + "end": { + "line": 127, + "column": 56 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2687, + 2688 + ], + "loc": { + "start": { + "line": 127, + "column": 56 + }, + "end": { + "line": 127, + "column": 57 + } + } + }, + { + "type": "HTMLText", + "value": "drag", + "range": [ + 2688, + 2692 + ], + "loc": { + "start": { + "line": 127, + "column": 57 + }, + "end": { + "line": 127, + "column": 61 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2692, + 2693 + ], + "loc": { + "start": { + "line": 127, + "column": 61 + }, + "end": { + "line": 127, + "column": 62 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 2693, + 2695 + ], + "loc": { + "start": { + "line": 127, + "column": 62 + }, + "end": { + "line": 127, + "column": 64 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 2695, + 2696 + ], + "loc": { + "start": { + "line": 127, + "column": 64 + }, + "end": { + "line": 127, + "column": 65 + } + } + }, + { + "type": "HTMLText", + "value": "seek", + "range": [ + 2696, + 2700 + ], + "loc": { + "start": { + "line": 127, + "column": 65 + }, "end": { "line": 127, "column": 69 diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-output.json b/tests/fixtures/parser/ast/tutorial/module-exports01-output.json index 1b4d3557..1be48513 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-output.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-output.json @@ -2555,16 +2555,124 @@ }, { "type": "HTMLText", - "value": "\n\tstop all audio\n", + "value": "\n\t", "range": [ 109, - 126 + 111 ], "loc": { "start": { "line": 5, "column": 27 }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "stop", + "range": [ + 111, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "all", + "range": [ + 116, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "audio", + "range": [ + 120, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, "end": { "line": 7, "column": 0 @@ -2879,16 +2987,124 @@ }, { "type": "HTMLText", - "value": "The Blue Danube Waltz", + "value": "The", "range": [ 281, - 302 + 284 ], "loc": { "start": { "line": 12, "column": 8 }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "Blue", + "range": [ + 285, + 289 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 289, + 290 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "Danube", + "range": [ + 290, + 296 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "Waltz", + "range": [ + 297, + 302 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, "end": { "line": 12, "column": 29 @@ -2969,16 +3185,52 @@ }, { "type": "HTMLText", - "value": "Johann Strauss", + "value": "Johann", "range": [ 315, - 329 + 321 ], "loc": { "start": { "line": 13, "column": 11 }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 321, + 322 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "Strauss", + "range": [ + 322, + 329 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, "end": { "line": 13, "column": 25 @@ -3059,16 +3311,52 @@ }, { "type": "HTMLText", - "value": "European Archive", + "value": "European", "range": [ 343, - 359 + 351 ], "loc": { "start": { "line": 14, "column": 12 }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 351, + 352 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "Archive", + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 14, + "column": 21 + }, "end": { "line": 14, "column": 28 @@ -3365,10 +3653,10 @@ }, { "type": "HTMLText", - "value": "Mars, the Bringer of War", + "value": "Mars,", "range": [ 503, - 527 + 508 ], "loc": { "start": { @@ -3377,43 +3665,187 @@ }, "end": { "line": 20, - "column": 32 + "column": 13 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 527, - 528 + 508, + 509 ], "loc": { "start": { "line": 20, - "column": 32 + "column": 13 }, "end": { "line": 20, - "column": 33 + "column": 14 } } }, { - "type": "HTMLIdentifier", - "value": "composer", + "type": "HTMLText", + "value": "the", "range": [ - 530, - 538 + 509, + 512 ], "loc": { "start": { - "line": 21, - "column": 1 + "line": 20, + "column": 14 }, "end": { - "line": 21, - "column": 9 + "line": 20, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 512, + 513 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "Bringer", + "range": [ + 513, + 520 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 20, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 520, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "of", + "range": [ + 521, + 523 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 523, + 524 + ], + "loc": { + "start": { + "line": 20, + "column": 28 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "War", + "range": [ + 524, + 527 + ], + "loc": { + "start": { + "line": 20, + "column": 29 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 527, + 528 + ], + "loc": { + "start": { + "line": 20, + "column": 32 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "composer", + "range": [ + 530, + 538 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 9 } } }, @@ -3455,16 +3887,52 @@ }, { "type": "HTMLText", - "value": "Gustav Holst", + "value": "Gustav", "range": [ 540, - 552 + 546 ], "loc": { "start": { "line": 21, "column": 11 }, + "end": { + "line": 21, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 546, + 547 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "Holst", + "range": [ + 547, + 552 + ], + "loc": { + "start": { + "line": 21, + "column": 18 + }, "end": { "line": 21, "column": 23 @@ -3545,10 +4013,10 @@ }, { "type": "HTMLText", - "value": "USAF Heritage of America Band", + "value": "USAF", "range": [ 566, - 595 + 570 ], "loc": { "start": { @@ -3557,150 +4025,294 @@ }, "end": { "line": 22, - "column": 41 + "column": 16 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 595, - 596 + 570, + 571 ], "loc": { "start": { "line": 22, - "column": 41 + "column": 16 }, "end": { "line": 22, - "column": 42 + "column": 17 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": "Heritage", "range": [ - 597, - 598 + 571, + 579 ], "loc": { "start": { - "line": 23, - "column": 0 + "line": 22, + "column": 17 }, "end": { - "line": 23, - "column": 1 + "line": 22, + "column": 25 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": " ", "range": [ - 598, - 599 + 579, + 580 ], "loc": { "start": { - "line": 23, - "column": 1 + "line": 22, + "column": 25 }, "end": { - "line": 23, - "column": 2 + "line": 22, + "column": 26 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": "of", "range": [ - 599, - 601 + 580, + 582 ], "loc": { "start": { - "line": 23, - "column": 2 + "line": 22, + "column": 26 }, "end": { - "line": 25, - "column": 0 + "line": 22, + "column": 28 } } }, { - "type": "HTMLComment", - "value": "", + "type": "HTMLText", + "value": " ", "range": [ - 601, - 655 + 582, + 583 ], "loc": { "start": { - "line": 25, - "column": 0 + "line": 22, + "column": 28 }, "end": { - "line": 25, - "column": 54 + "line": 22, + "column": 29 } } }, { "type": "HTMLText", - "value": "\n", + "value": "America", "range": [ - 655, - 656 + 583, + 590 ], "loc": { "start": { - "line": 25, - "column": 54 + "line": 22, + "column": 29 }, "end": { - "line": 26, - "column": 0 + "line": 22, + "column": 36 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": " ", "range": [ - 656, - 657 + 590, + 591 ], "loc": { "start": { - "line": 26, - "column": 0 + "line": 22, + "column": 36 }, "end": { - "line": 26, - "column": 1 + "line": 22, + "column": 37 } } }, { - "type": "Identifier", - "value": "AudioPlayer", + "type": "HTMLText", + "value": "Band", "range": [ - 657, - 668 + 591, + 595 ], "loc": { "start": { - "line": 26, - "column": 1 + "line": 22, + "column": 37 }, "end": { - "line": 26, + "line": 22, + "column": 41 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 595, + 596 + ], + "loc": { + "start": { + "line": 22, + "column": 41 + }, + "end": { + "line": 22, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 597, + 598 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 598, + 599 + ], + "loc": { + "start": { + "line": 23, + "column": 1 + }, + "end": { + "line": 23, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 599, + 601 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 25, + "column": 0 + } + } + }, + { + "type": "HTMLComment", + "value": "", + "range": [ + 601, + 655 + ], + "loc": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 655, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 54 + }, + "end": { + "line": 26, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 656, + 657 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "AudioPlayer", + "range": [ + 657, + 668 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, "column": 12 } } @@ -3851,16 +4463,88 @@ }, { "type": "HTMLText", - "value": "Gymnopédie no. 1", + "value": "Gymnopédie", "range": [ 734, - 750 + 744 ], "loc": { "start": { "line": 28, "column": 8 }, + "end": { + "line": 28, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 744, + 745 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "no.", + "range": [ + 745, + 748 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 748, + 749 + ], + "loc": { + "start": { + "line": 28, + "column": 22 + }, + "end": { + "line": 28, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "1", + "range": [ + 749, + 750 + ], + "loc": { + "start": { + "line": 28, + "column": 23 + }, "end": { "line": 28, "column": 24 @@ -3941,16 +4625,52 @@ }, { "type": "HTMLText", - "value": "Erik Satie", + "value": "Erik", "range": [ 763, - 773 + 767 ], "loc": { "start": { "line": 29, "column": 11 }, + "end": { + "line": 29, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 767, + 768 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "Satie", + "range": [ + 768, + 773 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, "end": { "line": 29, "column": 21 @@ -4031,10 +4751,10 @@ }, { "type": "HTMLText", - "value": "Prodigal Procrastinator", + "value": "Prodigal", "range": [ 787, - 810 + 795 ], "loc": { "start": { @@ -4043,38 +4763,74 @@ }, "end": { "line": 30, - "column": 35 + "column": 20 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 810, - 811 + 795, + 796 ], "loc": { "start": { "line": 30, - "column": 35 + "column": 20 }, "end": { "line": 30, - "column": 36 + "column": 21 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": "Procrastinator", "range": [ - 812, - 813 + 796, + 810 ], "loc": { "start": { - "line": 31, + "line": 30, + "column": 21 + }, + "end": { + "line": 30, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 810, + 811 + ], + "loc": { + "start": { + "line": 30, + "column": 35 + }, + "end": { + "line": 30, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 812, + 813 + ], + "loc": { + "start": { + "line": 31, "column": 0 }, "end": { @@ -4337,10 +5093,10 @@ }, { "type": "HTMLText", - "value": "Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio", + "value": "Symphony", "range": [ 970, - 1020 + 978 ], "loc": { "start": { @@ -4349,489 +5105,1353 @@ }, "end": { "line": 36, - "column": 58 + "column": 16 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 1020, - 1021 + 978, + 979 ], "loc": { "start": { "line": 36, - "column": 58 + "column": 16 }, "end": { "line": 36, - "column": 59 + "column": 17 } } }, { - "type": "HTMLIdentifier", - "value": "composer", + "type": "HTMLText", + "value": "no.", "range": [ - 1023, - 1031 + 979, + 982 ], "loc": { "start": { - "line": 37, - "column": 1 + "line": 36, + "column": 17 }, "end": { - "line": 37, - "column": 9 + "line": 36, + "column": 20 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": " ", "range": [ - 1031, - 1032 + 982, + 983 ], "loc": { "start": { - "line": 37, - "column": 9 + "line": 36, + "column": 20 }, "end": { - "line": 37, - "column": 10 + "line": 36, + "column": 21 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "5", "range": [ - 1032, - 1033 + 983, + 984 ], "loc": { "start": { - "line": 37, - "column": 10 + "line": 36, + "column": 21 }, "end": { - "line": 37, - "column": 11 + "line": 36, + "column": 22 } } }, { "type": "HTMLText", - "value": "Ludwig van Beethoven", + "value": " ", "range": [ - 1033, - 1053 + 984, + 985 ], "loc": { "start": { - "line": 37, - "column": 11 + "line": 36, + "column": 22 }, "end": { - "line": 37, - "column": 31 + "line": 36, + "column": 23 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "in", "range": [ - 1053, - 1054 + 985, + 987 ], "loc": { "start": { - "line": 37, - "column": 31 + "line": 36, + "column": 23 }, "end": { - "line": 37, - "column": 32 + "line": 36, + "column": 25 } } }, { - "type": "HTMLIdentifier", - "value": "performer", + "type": "HTMLText", + "value": " ", "range": [ - 1056, - 1065 + 987, + 988 ], "loc": { "start": { - "line": 38, - "column": 1 + "line": 36, + "column": 25 }, "end": { - "line": 38, - "column": 10 + "line": 36, + "column": 26 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": "Cm,", "range": [ - 1065, - 1066 + 988, + 991 ], "loc": { "start": { - "line": 38, - "column": 10 + "line": 36, + "column": 26 }, "end": { - "line": 38, - "column": 11 + "line": 36, + "column": 29 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 1066, - 1067 + 991, + 992 ], "loc": { "start": { - "line": 38, - "column": 11 + "line": 36, + "column": 29 }, "end": { - "line": 38, - "column": 12 + "line": 36, + "column": 30 } } }, { "type": "HTMLText", - "value": "European Archive", + "value": "Op.", "range": [ - 1067, - 1083 + 992, + 995 ], "loc": { "start": { - "line": 38, - "column": 12 + "line": 36, + "column": 30 }, "end": { - "line": 38, - "column": 28 + "line": 36, + "column": 33 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 1083, - 1084 + 995, + 996 ], "loc": { "start": { - "line": 38, - "column": 28 + "line": 36, + "column": 33 }, "end": { - "line": 38, - "column": 29 + "line": 36, + "column": 34 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": "67", "range": [ - 1085, - 1086 + 996, + 998 ], "loc": { "start": { - "line": 39, - "column": 0 + "line": 36, + "column": 34 }, "end": { - "line": 39, - "column": 1 + "line": 36, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 998, + 999 + ], + "loc": { + "start": { + "line": 36, + "column": 36 + }, + "end": { + "line": 36, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "-", + "range": [ + 999, + 1000 + ], + "loc": { + "start": { + "line": 36, + "column": 37 + }, + "end": { + "line": 36, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1000, + 1001 + ], + "loc": { + "start": { + "line": 36, + "column": 38 + }, + "end": { + "line": 36, + "column": 39 + } + } + }, + { + "type": "HTMLText", + "value": "I.", + "range": [ + 1001, + 1003 + ], + "loc": { + "start": { + "line": 36, + "column": 39 + }, + "end": { + "line": 36, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1003, + 1004 + ], + "loc": { + "start": { + "line": 36, + "column": 41 + }, + "end": { + "line": 36, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "Allegro", + "range": [ + 1004, + 1011 + ], + "loc": { + "start": { + "line": 36, + "column": 42 + }, + "end": { + "line": 36, + "column": 49 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1011, + 1012 + ], + "loc": { + "start": { + "line": 36, + "column": 49 + }, + "end": { + "line": 36, + "column": 50 + } + } + }, + { + "type": "HTMLText", + "value": "con", + "range": [ + 1012, + 1015 + ], + "loc": { + "start": { + "line": 36, + "column": 50 + }, + "end": { + "line": 36, + "column": 53 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1015, + 1016 + ], + "loc": { + "start": { + "line": 36, + "column": 53 + }, + "end": { + "line": 36, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": "brio", + "range": [ + 1016, + 1020 + ], + "loc": { + "start": { + "line": 36, + "column": 54 + }, + "end": { + "line": 36, + "column": 58 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1020, + 1021 + ], + "loc": { + "start": { + "line": 36, + "column": 58 + }, + "end": { + "line": 36, + "column": 59 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "composer", + "range": [ + 1023, + 1031 + ], + "loc": { + "start": { + "line": 37, + "column": 1 + }, + "end": { + "line": 37, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 1031, + 1032 + ], + "loc": { + "start": { + "line": 37, + "column": 9 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1032, + 1033 + ], + "loc": { + "start": { + "line": 37, + "column": 10 + }, + "end": { + "line": 37, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "Ludwig", + "range": [ + 1033, + 1039 + ], + "loc": { + "start": { + "line": 37, + "column": 11 + }, + "end": { + "line": 37, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1039, + 1040 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "van", + "range": [ + 1040, + 1043 + ], + "loc": { + "start": { + "line": 37, + "column": 18 + }, + "end": { + "line": 37, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1043, + 1044 + ], + "loc": { + "start": { + "line": 37, + "column": 21 + }, + "end": { + "line": 37, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "Beethoven", + "range": [ + 1044, + 1053 + ], + "loc": { + "start": { + "line": 37, + "column": 22 + }, + "end": { + "line": 37, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1053, + 1054 + ], + "loc": { + "start": { + "line": 37, + "column": 31 + }, + "end": { + "line": 37, + "column": 32 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "performer", + "range": [ + 1056, + 1065 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 1065, + 1066 + ], + "loc": { + "start": { + "line": 38, + "column": 10 + }, + "end": { + "line": 38, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1066, + 1067 + ], + "loc": { + "start": { + "line": 38, + "column": 11 + }, + "end": { + "line": 38, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "European", + "range": [ + 1067, + 1075 + ], + "loc": { + "start": { + "line": 38, + "column": 12 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1075, + 1076 + ], + "loc": { + "start": { + "line": 38, + "column": 20 + }, + "end": { + "line": 38, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "Archive", + "range": [ + 1076, + 1083 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1083, + 1084 + ], + "loc": { + "start": { + "line": 38, + "column": 28 + }, + "end": { + "line": 38, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 1085, + 1086 + ], + "loc": { + "start": { + "line": 39, + "column": 0 + }, + "end": { + "line": 39, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 1086, + 1087 + ], + "loc": { + "start": { + "line": 39, + "column": 1 + }, + "end": { + "line": 39, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 1087, + 1089 + ], + "loc": { + "start": { + "line": 39, + "column": 2 + }, + "end": { + "line": 41, + "column": 0 + } + } + }, + { + "type": "HTMLComment", + "value": "", + "range": [ + 1089, + 1155 + ], + "loc": { + "start": { + "line": 41, + "column": 0 + }, + "end": { + "line": 41, + "column": 66 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 1155, + 1156 + ], + "loc": { + "start": { + "line": 41, + "column": 66 + }, + "end": { + "line": 42, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 1156, + 1157 + ], + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 42, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "AudioPlayer", + "range": [ + 1157, + 1168 + ], + "loc": { + "start": { + "line": 42, + "column": 1 + }, + "end": { + "line": 42, + "column": 12 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "src", + "range": [ + 1170, + 1173 + ], + "loc": { + "start": { + "line": 43, + "column": 1 + }, + "end": { + "line": 43, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 1173, + 1174 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1174, + 1175 + ], + "loc": { + "start": { + "line": 43, + "column": 5 + }, + "end": { + "line": 43, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "https://sveltejs.github.io/assets/music/mozart.mp3", + "range": [ + 1175, + 1225 + ], + "loc": { + "start": { + "line": 43, + "column": 6 + }, + "end": { + "line": 43, + "column": 56 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1225, + 1226 + ], + "loc": { + "start": { + "line": 43, + "column": 56 + }, + "end": { + "line": 43, + "column": 57 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "title", + "range": [ + 1228, + 1233 + ], + "loc": { + "start": { + "line": 44, + "column": 1 + }, + "end": { + "line": 44, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 1233, + 1234 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 1234, + 1235 + ], + "loc": { + "start": { + "line": 44, + "column": 7 + }, + "end": { + "line": 44, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "Requiem", + "range": [ + 1235, + 1242 + ], + "loc": { + "start": { + "line": 44, + "column": 8 + }, + "end": { + "line": 44, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1242, + 1243 + ], + "loc": { + "start": { + "line": 44, + "column": 15 + }, + "end": { + "line": 44, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 1243, + 1245 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1245, + 1246 + ], + "loc": { + "start": { + "line": 44, + "column": 18 + }, + "end": { + "line": 44, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "D", + "range": [ + 1246, + 1247 + ], + "loc": { + "start": { + "line": 44, + "column": 19 + }, + "end": { + "line": 44, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1247, + 1248 + ], + "loc": { + "start": { + "line": 44, + "column": 20 + }, + "end": { + "line": 44, + "column": 21 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "minor,", "range": [ - 1086, - 1087 + 1248, + 1254 ], "loc": { "start": { - "line": 39, - "column": 1 + "line": 44, + "column": 21 }, "end": { - "line": 39, - "column": 2 + "line": 44, + "column": 27 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": " ", "range": [ - 1087, - 1089 + 1254, + 1255 ], "loc": { "start": { - "line": 39, - "column": 2 + "line": 44, + "column": 27 }, "end": { - "line": 41, - "column": 0 + "line": 44, + "column": 28 } } }, { - "type": "HTMLComment", - "value": "", + "type": "HTMLText", + "value": "K.", "range": [ - 1089, - 1155 + 1255, + 1257 ], "loc": { "start": { - "line": 41, - "column": 0 + "line": 44, + "column": 28 }, "end": { - "line": 41, - "column": 66 + "line": 44, + "column": 30 } } }, { "type": "HTMLText", - "value": "\n", + "value": " ", "range": [ - 1155, - 1156 + 1257, + 1258 ], "loc": { "start": { - "line": 41, - "column": 66 + "line": 44, + "column": 30 }, "end": { - "line": 42, - "column": 0 + "line": 44, + "column": 31 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "626", "range": [ - 1156, - 1157 + 1258, + 1261 ], "loc": { "start": { - "line": 42, - "column": 0 + "line": 44, + "column": 31 }, "end": { - "line": 42, - "column": 1 + "line": 44, + "column": 34 } } }, { - "type": "Identifier", - "value": "AudioPlayer", + "type": "HTMLText", + "value": " ", "range": [ - 1157, - 1168 + 1261, + 1262 ], "loc": { "start": { - "line": 42, - "column": 1 + "line": 44, + "column": 34 }, "end": { - "line": 42, - "column": 12 + "line": 44, + "column": 35 } } }, { - "type": "HTMLIdentifier", - "value": "src", + "type": "HTMLText", + "value": "-", "range": [ - 1170, - 1173 + 1262, + 1263 ], "loc": { "start": { - "line": 43, - "column": 1 + "line": 44, + "column": 35 }, "end": { - "line": 43, - "column": 4 + "line": 44, + "column": 36 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": " ", "range": [ - 1173, - 1174 + 1263, + 1264 ], "loc": { "start": { - "line": 43, - "column": 4 + "line": 44, + "column": 36 }, "end": { - "line": 43, - "column": 5 + "line": 44, + "column": 37 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "III.", "range": [ - 1174, - 1175 + 1264, + 1268 ], "loc": { "start": { - "line": 43, - "column": 5 + "line": 44, + "column": 37 }, "end": { - "line": 43, - "column": 6 + "line": 44, + "column": 41 } } }, { "type": "HTMLText", - "value": "https://sveltejs.github.io/assets/music/mozart.mp3", + "value": " ", "range": [ - 1175, - 1225 + 1268, + 1269 ], "loc": { "start": { - "line": 43, - "column": 6 + "line": 44, + "column": 41 }, "end": { - "line": 43, - "column": 56 + "line": 44, + "column": 42 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "Sequence", "range": [ - 1225, - 1226 + 1269, + 1277 ], "loc": { "start": { - "line": 43, - "column": 56 + "line": 44, + "column": 42 }, "end": { - "line": 43, - "column": 57 + "line": 44, + "column": 50 } } }, { - "type": "HTMLIdentifier", - "value": "title", + "type": "HTMLText", + "value": " ", "range": [ - 1228, - 1233 + 1277, + 1278 ], "loc": { "start": { "line": 44, - "column": 1 + "column": 50 }, "end": { "line": 44, - "column": 6 + "column": 51 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": "-", "range": [ - 1233, - 1234 + 1278, + 1279 ], "loc": { "start": { "line": 44, - "column": 6 + "column": 51 }, "end": { "line": 44, - "column": 7 + "column": 52 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 1234, - 1235 + 1279, + 1280 ], "loc": { "start": { "line": 44, - "column": 7 + "column": 52 }, "end": { "line": 44, - "column": 8 + "column": 53 } } }, { "type": "HTMLText", - "value": "Requiem in D minor, K. 626 - III. Sequence - Lacrymosa", + "value": "Lacrymosa", "range": [ - 1235, + 1280, 1289 ], "loc": { "start": { "line": 44, - "column": 8 + "column": 53 }, "end": { "line": 44, @@ -4913,16 +6533,88 @@ }, { "type": "HTMLText", - "value": "Wolfgang Amadeus Mozart", + "value": "Wolfgang", "range": [ 1302, - 1325 + 1310 ], "loc": { "start": { "line": 45, "column": 11 }, + "end": { + "line": 45, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1310, + 1311 + ], + "loc": { + "start": { + "line": 45, + "column": 19 + }, + "end": { + "line": 45, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "Amadeus", + "range": [ + 1311, + 1318 + ], + "loc": { + "start": { + "line": 45, + "column": 20 + }, + "end": { + "line": 45, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1318, + 1319 + ], + "loc": { + "start": { + "line": 45, + "column": 27 + }, + "end": { + "line": 45, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "Mozart", + "range": [ + 1319, + 1325 + ], + "loc": { + "start": { + "line": 45, + "column": 28 + }, "end": { "line": 45, "column": 34 @@ -5003,16 +6695,52 @@ }, { "type": "HTMLText", - "value": "Markus Staab", + "value": "Markus", "range": [ 1339, - 1351 + 1345 ], "loc": { "start": { "line": 46, "column": 12 }, + "end": { + "line": 46, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1345, + 1346 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "Staab", + "range": [ + 1346, + 1351 + ], + "loc": { + "start": { + "line": 46, + "column": 19 + }, "end": { "line": 46, "column": 24 diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-output.json b/tests/fixtures/parser/ast/tutorial/module-exports02-output.json index e6d666d6..470bc4cd 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-output.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-output.json @@ -6258,16 +6258,124 @@ }, { "type": "HTMLText", - "value": " / performed by ", + "value": " ", "range": [ 781, - 797 + 782 ], "loc": { "start": { "line": 43, "column": 31 }, + "end": { + "line": 43, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "/", + "range": [ + 782, + 783 + ], + "loc": { + "start": { + "line": 43, + "column": 32 + }, + "end": { + "line": 43, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 783, + 784 + ], + "loc": { + "start": { + "line": 43, + "column": 33 + }, + "end": { + "line": 43, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "performed", + "range": [ + 784, + 793 + ], + "loc": { + "start": { + "line": 43, + "column": 34 + }, + "end": { + "line": 43, + "column": 43 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 793, + 794 + ], + "loc": { + "start": { + "line": 43, + "column": 43 + }, + "end": { + "line": 43, + "column": 44 + } + } + }, + { + "type": "HTMLText", + "value": "by", + "range": [ + 794, + 796 + ], + "loc": { + "start": { + "line": 43, + "column": 44 + }, + "end": { + "line": 43, + "column": 46 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 796, + 797 + ], + "loc": { + "start": { + "line": 43, + "column": 46 + }, "end": { "line": 43, "column": 47 diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-output.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-output.json index 6501e77e..b91baefd 100644 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-output.json +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-output.json @@ -5810,16 +5810,88 @@ }, { "type": "HTMLText", - "value": "\n\tOne scoop\n", + "value": "\n\t", "range": [ 393, - 405 + 395 ], "loc": { "start": { "line": 20, "column": 49 }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "One", + "range": [ + 395, + 398 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 398, + 399 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "scoop", + "range": [ + 399, + 404 + ], + "loc": { + "start": { + "line": 21, + "column": 5 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 404, + 405 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, "end": { "line": 22, "column": 0 @@ -6314,16 +6386,88 @@ }, { "type": "HTMLText", - "value": "\n\tTwo scoops\n", + "value": "\n\t", "range": [ 472, - 485 + 474 ], "loc": { "start": { "line": 25, "column": 49 }, + "end": { + "line": 26, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Two", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "scoops", + "range": [ + 478, + 484 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, "end": { "line": 27, "column": 0 @@ -6818,16 +6962,88 @@ }, { "type": "HTMLText", - "value": "\n\tThree scoops\n", + "value": "\n\t", "range": [ 552, - 567 + 554 ], "loc": { "start": { "line": 30, "column": 49 }, + "end": { + "line": 31, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Three", + "range": [ + 554, + 559 + ], + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 31, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 559, + 560 + ], + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "scoops", + "range": [ + 560, + 566 + ], + "loc": { + "start": { + "line": 31, + "column": 7 + }, + "end": { + "line": 31, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 566, + 567 + ], + "loc": { + "start": { + "line": 31, + "column": 13 + }, "end": { "line": 32, "column": 0 @@ -8078,10 +8294,10 @@ }, { "type": "HTMLText", - "value": "Please select at least one flavour", + "value": "Please", "range": [ 765, - 799 + 771 ], "loc": { "start": { @@ -8090,133 +8306,313 @@ }, "end": { "line": 45, - "column": 38 + "column": 10 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": " ", "range": [ - 799, - 800 + 771, + 772 ], "loc": { "start": { "line": 45, - "column": 38 + "column": 10 }, "end": { "line": 45, - "column": 39 + "column": 11 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": "select", "range": [ - 800, - 801 + 772, + 778 ], "loc": { "start": { "line": 45, - "column": 39 + "column": 11 }, "end": { "line": 45, - "column": 40 + "column": 17 } } }, { - "type": "HTMLIdentifier", - "value": "p", + "type": "HTMLText", + "value": " ", "range": [ - 801, - 802 + 778, + 779 ], "loc": { "start": { "line": 45, - "column": 40 + "column": 17 }, "end": { "line": 45, - "column": 41 + "column": 18 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "at", "range": [ - 802, - 803 + 779, + 781 ], "loc": { "start": { "line": 45, - "column": 41 + "column": 18 }, "end": { "line": 45, - "column": 42 + "column": 20 } } }, { - "type": "Punctuator", - "value": "{", + "type": "HTMLText", + "value": " ", "range": [ - 804, - 805 + 781, + 782 ], "loc": { "start": { - "line": 46, - "column": 0 + "line": 45, + "column": 20 }, "end": { - "line": 46, - "column": 1 + "line": 45, + "column": 21 } } }, { - "type": "MustacheKeyword", - "value": ":else", + "type": "HTMLText", + "value": "least", "range": [ - 805, - 810 + 782, + 787 ], "loc": { "start": { - "line": 46, - "column": 1 + "line": 45, + "column": 21 }, "end": { - "line": 46, - "column": 6 + "line": 45, + "column": 26 } } }, { - "type": "MustacheKeyword", - "value": "if", + "type": "HTMLText", + "value": " ", "range": [ - 811, - 813 + 787, + 788 ], "loc": { "start": { - "line": 46, - "column": 7 + "line": 45, + "column": 26 }, "end": { - "line": 46, - "column": 9 + "line": 45, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "one", + "range": [ + 788, + 791 + ], + "loc": { + "start": { + "line": 45, + "column": 27 + }, + "end": { + "line": 45, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 791, + 792 + ], + "loc": { + "start": { + "line": 45, + "column": 30 + }, + "end": { + "line": 45, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "flavour", + "range": [ + 792, + 799 + ], + "loc": { + "start": { + "line": 45, + "column": 31 + }, + "end": { + "line": 45, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 799, + 800 + ], + "loc": { + "start": { + "line": 45, + "column": 38 + }, + "end": { + "line": 45, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 800, + 801 + ], + "loc": { + "start": { + "line": 45, + "column": 39 + }, + "end": { + "line": 45, + "column": 40 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 801, + 802 + ], + "loc": { + "start": { + "line": 45, + "column": 40 + }, + "end": { + "line": 45, + "column": 41 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 802, + 803 + ], + "loc": { + "start": { + "line": 45, + "column": 41 + }, + "end": { + "line": 45, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 804, + 805 + ], + "loc": { + "start": { + "line": 46, + "column": 0 + }, + "end": { + "line": 46, + "column": 1 + } + } + }, + { + "type": "MustacheKeyword", + "value": ":else", + "range": [ + 805, + 810 + ], + "loc": { + "start": { + "line": 46, + "column": 1 + }, + "end": { + "line": 46, + "column": 6 + } + } + }, + { + "type": "MustacheKeyword", + "value": "if", + "range": [ + 811, + 813 + ], + "loc": { + "start": { + "line": 46, + "column": 7 + }, + "end": { + "line": 46, + "column": 9 } } }, @@ -8384,16 +8780,196 @@ }, { "type": "HTMLText", - "value": "Can't order more flavours than scoops!", + "value": "Can't", "range": [ 844, - 882 + 849 ], "loc": { "start": { "line": 47, "column": 4 }, + "end": { + "line": 47, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 849, + 850 + ], + "loc": { + "start": { + "line": 47, + "column": 9 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "order", + "range": [ + 850, + 855 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 855, + 856 + ], + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "more", + "range": [ + 856, + 860 + ], + "loc": { + "start": { + "line": 47, + "column": 16 + }, + "end": { + "line": 47, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 860, + 861 + ], + "loc": { + "start": { + "line": 47, + "column": 20 + }, + "end": { + "line": 47, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "flavours", + "range": [ + 861, + 869 + ], + "loc": { + "start": { + "line": 47, + "column": 21 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 869, + 870 + ], + "loc": { + "start": { + "line": 47, + "column": 29 + }, + "end": { + "line": 47, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "than", + "range": [ + 870, + 874 + ], + "loc": { + "start": { + "line": 47, + "column": 30 + }, + "end": { + "line": 47, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 874, + 875 + ], + "loc": { + "start": { + "line": 47, + "column": 34 + }, + "end": { + "line": 47, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "scoops!", + "range": [ + 875, + 882 + ], + "loc": { + "start": { + "line": 47, + "column": 35 + }, "end": { "line": 47, "column": 42 @@ -8582,16 +9158,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tYou ordered ", + "value": "\n\t\t", "range": [ 899, - 914 + 902 ], "loc": { "start": { "line": 49, "column": 4 }, + "end": { + "line": 50, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "You", + "range": [ + 902, + 905 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 905, + 906 + ], + "loc": { + "start": { + "line": 50, + "column": 5 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "ordered", + "range": [ + 906, + 913 + ], + "loc": { + "start": { + "line": 50, + "column": 6 + }, + "end": { + "line": 50, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 913, + 914 + ], + "loc": { + "start": { + "line": 50, + "column": 13 + }, "end": { "line": 50, "column": 14 @@ -8834,16 +9482,52 @@ }, { "type": "HTMLText", - "value": "\n\t\tof ", + "value": "\n\t\t", "range": [ 958, - 964 + 961 ], "loc": { "start": { "line": 50, "column": 58 }, + "end": { + "line": 51, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "of", + "range": [ + 961, + 963 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 963, + 964 + ], + "loc": { + "start": { + "line": 51, + "column": 4 + }, "end": { "line": 51, "column": 5 diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-output.json b/tests/fixtures/parser/ast/tutorial/named-slots01-output.json index ce9b226f..ce150cd9 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-output.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-output.json @@ -1194,16 +1194,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tP. Sherman\n\t", + "value": "\n\t\t", "range": [ 136, - 151 + 139 ], "loc": { "start": { "line": 7, "column": 19 }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "P.", + "range": [ + 139, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "Sherman", + "range": [ + 142, + 149 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 149, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, "end": { "line": 9, "column": 1 @@ -1446,16 +1518,106 @@ }, { "type": "HTMLText", - "value": "\n\t\t42 Wallaby Way", + "value": "\n\t\t", "range": [ 182, - 199 + 185 ], "loc": { "start": { "line": 11, "column": 22 }, + "end": { + "line": 12, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "42", + "range": [ + 185, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "Wallaby", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "Way", + "range": [ + 196, + 199 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, "end": { "line": 12, "column": 16 @@ -1518,16 +1680,52 @@ }, { "type": "HTMLText", - "value": "\n\t\tSydney\n\t", + "value": "\n\t\t", "range": [ 203, - 214 + 206 ], "loc": { "start": { "line": 12, "column": 20 }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Sydney", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 212, + 214 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, "end": { "line": 14, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-output.json b/tests/fixtures/parser/ast/tutorial/named-slots02-output.json index 305d4996..27b53f61 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-output.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-output.json @@ -2413,16 +2413,52 @@ }, { "type": "HTMLText", - "value": "Unknown name", + "value": "Unknown", "range": [ 641, - 653 + 648 ], "loc": { "start": { "line": 32, "column": 25 }, + "end": { + "line": 32, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 648, + 649 + ], + "loc": { + "start": { + "line": 32, + "column": 32 + }, + "end": { + "line": 32, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "name", + "range": [ + 649, + 653 + ], + "loc": { + "start": { + "line": 32, + "column": 33 + }, "end": { "line": 32, "column": 37 @@ -3169,16 +3205,52 @@ }, { "type": "HTMLText", - "value": "Unknown address", + "value": "Unknown", "range": [ 751, - 766 + 758 ], "loc": { "start": { "line": 38, "column": 25 }, + "end": { + "line": 38, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 758, + 759 + ], + "loc": { + "start": { + "line": 38, + "column": 32 + }, + "end": { + "line": 38, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "address", + "range": [ + 759, + 766 + ], + "loc": { + "start": { + "line": 38, + "column": 33 + }, "end": { "line": 38, "column": 40 @@ -3925,16 +3997,52 @@ }, { "type": "HTMLText", - "value": "Unknown email", + "value": "Unknown", "range": [ 861, - 874 + 868 ], "loc": { "start": { "line": 44, "column": 25 }, + "end": { + "line": 44, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 868, + 869 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "email", + "range": [ + 869, + 874 + ], + "loc": { + "start": { + "line": 44, + "column": 33 + }, "end": { "line": 44, "column": 38 diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-output.json b/tests/fixtures/parser/ast/tutorial/nested-components01-output.json index b3f9968f..08aad1bb 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-output.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-output.json @@ -626,16 +626,124 @@ }, { "type": "HTMLText", - "value": "This is a paragraph.", + "value": "This", "range": [ 62, - 82 + 66 ], "loc": { "start": { "line": 5, "column": 3 }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "paragraph.", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, "end": { "line": 5, "column": 23 diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-output.json b/tests/fixtures/parser/ast/tutorial/nested-components02-output.json index 13268795..67577078 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-output.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-output.json @@ -153,16 +153,124 @@ }, { "type": "HTMLText", - "value": "This is another paragraph.", + "value": "This", "range": [ 3, - 29 + 7 ], "loc": { "start": { "line": 1, "column": 3 }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 8, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "another", + "range": [ + 11, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "paragraph.", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, "end": { "line": 1, "column": 29 diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-output.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-output.json index 8037a0a1..f8d9cd68 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-output.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-output.json @@ -4044,16 +4044,52 @@ }, { "type": "HTMLText", - "value": " + ", + "value": " ", "range": [ 260, - 263 + 261 ], "loc": { "start": { "line": 16, "column": 6 }, + "end": { + "line": 16, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "+", + "range": [ + 261, + 262 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, "end": { "line": 16, "column": 9 @@ -4116,16 +4152,52 @@ }, { "type": "HTMLText", - "value": " = ", + "value": " ", "range": [ 266, - 269 + 267 ], "loc": { "start": { "line": 16, "column": 12 }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "=", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 16, + "column": 13 + }, + "end": { + "line": 16, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, "end": { "line": 16, "column": 15 diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-output.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-output.json index 4bf4142d..b8fa59d5 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-output.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-output.json @@ -4180,16 +4180,52 @@ }, { "type": "HTMLText", - "value": " + ", + "value": " ", "range": [ 280, - 283 + 281 ], "loc": { "start": { "line": 16, "column": 6 }, + "end": { + "line": 16, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "+", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 282, + 283 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, "end": { "line": 16, "column": 9 @@ -4252,16 +4288,52 @@ }, { "type": "HTMLText", - "value": " = ", + "value": " ", "range": [ 286, - 289 + 287 ], "loc": { "start": { "line": 16, "column": 12 }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "=", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 16, + "column": 13 + }, + "end": { + "line": 16, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 288, + 289 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, "end": { "line": 16, "column": 15 diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-output.json b/tests/fixtures/parser/ast/tutorial/ondestroy-output.json index 467a5069..126b77bf 100644 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-output.json +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-output.json @@ -1759,16 +1759,232 @@ }, { "type": "HTMLText", - "value": "\n\tThe page has been open for\n\t", + "value": "\n\t", "range": [ 180, - 210 + 182 ], "loc": { "start": { "line": 10, "column": 3 }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "page", + "range": [ + 186, + 190 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "has", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 194, + 195 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "been", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 199, + 200 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "open", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 11, + "column": 23 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "for", + "range": [ + 205, + 208 + ], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 208, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, "end": { "line": 12, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/onmount-output.json b/tests/fixtures/parser/ast/tutorial/onmount-output.json index 86fb2a5a..9268131c 100644 --- a/tests/fixtures/parser/ast/tutorial/onmount-output.json +++ b/tests/fixtures/parser/ast/tutorial/onmount-output.json @@ -2897,16 +2897,52 @@ }, { "type": "HTMLText", - "value": "Photo album", + "value": "Photo", "range": [ 389, - 400 + 394 ], "loc": { "start": { "line": 26, "column": 4 }, + "end": { + "line": 26, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 26, + "column": 9 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "album", + "range": [ + 395, + 400 + ], + "loc": { + "start": { + "line": 26, + "column": 10 + }, "end": { "line": 26, "column": 15 diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-output.json index 14b8e247..cb49a424 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-output.json @@ -2434,16 +2434,52 @@ }, { "type": "HTMLText", - "value": "\n\tProjects\n", + "value": "\n\t", "range": [ 385, - 396 + 387 ], "loc": { "start": { "line": 32, "column": 4 }, + "end": { + "line": 33, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Projects", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 33, + "column": 1 + }, + "end": { + "line": 33, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 395, + 396 + ], + "loc": { + "start": { + "line": 33, + "column": 9 + }, "end": { "line": 34, "column": 0 @@ -2776,16 +2812,88 @@ }, { "type": "HTMLText", - "value": "Add Typescript support", + "value": "Add", "range": [ 435, - 457 + 438 ], "loc": { "start": { "line": 39, "column": 10 }, + "end": { + "line": 39, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 438, + 439 + ], + "loc": { + "start": { + "line": 39, + "column": 13 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "Typescript", + "range": [ + 439, + 449 + ], + "loc": { + "start": { + "line": 39, + "column": 14 + }, + "end": { + "line": 39, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 449, + 450 + ], + "loc": { + "start": { + "line": 39, + "column": 24 + }, + "end": { + "line": 39, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "support", + "range": [ + 450, + 457 + ], + "loc": { + "start": { + "line": 39, + "column": 25 + }, "end": { "line": 39, "column": 32 @@ -3280,16 +3388,52 @@ }, { "type": "HTMLText", - "value": "Ecma Script", + "value": "Ecma", "range": [ 549, - 560 + 553 ], "loc": { "start": { "line": 44, "column": 19 }, + "end": { + "line": 44, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 553, + 554 + ], + "loc": { + "start": { + "line": 44, + "column": 23 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "Script", + "range": [ + 554, + 560 + ], + "loc": { + "start": { + "line": 44, + "column": 24 + }, "end": { "line": 44, "column": 30 @@ -3568,16 +3712,196 @@ }, { "type": "HTMLText", - "value": "Those interface tests are now passing.", + "value": "Those", "range": [ 614, - 652 + 619 ], "loc": { "start": { "line": 45, "column": 8 }, + "end": { + "line": 45, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 619, + 620 + ], + "loc": { + "start": { + "line": 45, + "column": 13 + }, + "end": { + "line": 45, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "interface", + "range": [ + 620, + 629 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 629, + 630 + ], + "loc": { + "start": { + "line": 45, + "column": 23 + }, + "end": { + "line": 45, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "tests", + "range": [ + 630, + 635 + ], + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 635, + 636 + ], + "loc": { + "start": { + "line": 45, + "column": 29 + }, + "end": { + "line": 45, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "are", + "range": [ + 636, + 639 + ], + "loc": { + "start": { + "line": 45, + "column": 30 + }, + "end": { + "line": 45, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 639, + 640 + ], + "loc": { + "start": { + "line": 45, + "column": 33 + }, + "end": { + "line": 45, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "now", + "range": [ + 640, + 643 + ], + "loc": { + "start": { + "line": 45, + "column": 34 + }, + "end": { + "line": 45, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 643, + 644 + ], + "loc": { + "start": { + "line": 45, + "column": 37 + }, + "end": { + "line": 45, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": "passing.", + "range": [ + 644, + 652 + ], + "loc": { + "start": { + "line": 45, + "column": 38 + }, "end": { "line": 45, "column": 46 @@ -4198,16 +4522,52 @@ }, { "type": "HTMLText", - "value": "Update documentation", + "value": "Update", "range": [ 729, - 749 + 735 ], "loc": { "start": { "line": 52, "column": 10 }, + "end": { + "line": 52, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 735, + 736 + ], + "loc": { + "start": { + "line": 52, + "column": 16 + }, + "end": { + "line": 52, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "documentation", + "range": [ + 736, + 749 + ], + "loc": { + "start": { + "line": 52, + "column": 17 + }, "end": { "line": 52, "column": 30 diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-output.json index 33615901..86acbf10 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots03-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-output.json @@ -2887,16 +2887,70 @@ }, { "type": "HTMLText", - "value": " tasks completed", + "value": " ", "range": [ 837, - 853 + 838 ], "loc": { "start": { "line": 56, "column": 34 }, + "end": { + "line": 56, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "tasks", + "range": [ + 838, + 843 + ], + "loc": { + "start": { + "line": 56, + "column": 35 + }, + "end": { + "line": 56, + "column": 40 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 843, + 844 + ], + "loc": { + "start": { + "line": 56, + "column": 40 + }, + "end": { + "line": 56, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "completed", + "range": [ + 844, + 853 + ], + "loc": { + "start": { + "line": 56, + "column": 41 + }, "end": { "line": 56, "column": 50 diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-output.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-output.json index 23d7ef97..8f8777e7 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-output.json @@ -1280,16 +1280,52 @@ }, { "type": "HTMLText", - "value": "\n\tClicked ", + "value": "\n\t", "range": [ 151, - 161 + 153 ], "loc": { "start": { "line": 10, "column": 31 }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Clicked", + "range": [ + 153, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 160, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, "end": { "line": 11, "column": 9 diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-output.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-output.json index 9243aab8..7ca58f22 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-output.json @@ -1730,16 +1730,52 @@ }, { "type": "HTMLText", - "value": "\n\tClicked ", + "value": "\n\t", "range": [ 139, - 149 + 141 ], "loc": { "start": { "line": 10, "column": 31 }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Clicked", + "range": [ + 141, + 148 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 148, + 149 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, "end": { "line": 11, "column": 9 @@ -2198,16 +2234,88 @@ }, { "type": "HTMLText", - "value": " doubled is ", + "value": " ", "range": [ 210, - 222 + 211 ], "loc": { "start": { "line": 13, "column": 10 }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "doubled", + "range": [ + 211, + 218 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 219, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 221, + 222 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, "end": { "line": 13, "column": 22 diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-output.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-output.json index ddbbb6d1..0430644d 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-output.json @@ -3034,16 +3034,52 @@ }, { "type": "HTMLText", - "value": "\n\tClicked ", + "value": "\n\t", "range": [ 321, - 331 + 323 ], "loc": { "start": { "line": 18, "column": 31 }, + "end": { + "line": 19, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Clicked", + "range": [ + 323, + 330 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 19, + "column": 8 + }, "end": { "line": 19, "column": 9 diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-output.json b/tests/fixtures/parser/ast/tutorial/readable-stores-output.json index 25f64ec8..9660fcb8 100644 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-output.json +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-output.json @@ -1637,16 +1637,106 @@ }, { "type": "HTMLText", - "value": "The time is ", + "value": "The", "range": [ 194, - 206 + 197 ], "loc": { "start": { "line": 12, "column": 4 }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 197, + 198 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "time", + "range": [ + 198, + 202 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 203, + 205 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, "end": { "line": 12, "column": 16 diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-output.json b/tests/fixtures/parser/ast/tutorial/select-bindings-output.json index 2021281f..77776a48 100644 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-output.json +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-output.json @@ -4317,16 +4317,52 @@ }, { "type": "HTMLText", - "value": "Insecurity questions", + "value": "Insecurity", "range": [ 469, - 489 + 479 ], "loc": { "start": { "line": 21, "column": 4 }, + "end": { + "line": 21, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 479, + 480 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "questions", + "range": [ + 480, + 489 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, "end": { "line": 21, "column": 24 @@ -6135,16 +6171,52 @@ }, { "type": "HTMLText", - "value": "\n\t\tSubmit\n\t", + "value": "\n\t\t", "range": [ 793, - 804 + 796 ], "loc": { "start": { "line": 34, "column": 40 }, + "end": { + "line": 35, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Submit", + "range": [ + 796, + 802 + ], + "loc": { + "start": { + "line": 35, + "column": 2 + }, + "end": { + "line": 35, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 802, + 804 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, "end": { "line": 36, "column": 1 @@ -6387,16 +6459,70 @@ }, { "type": "HTMLText", - "value": "selected question ", + "value": "selected", "range": [ 826, - 844 + 834 ], "loc": { "start": { "line": 39, "column": 3 }, + "end": { + "line": 39, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 834, + 835 + ], + "loc": { + "start": { + "line": 39, + "column": 11 + }, + "end": { + "line": 39, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "question", + "range": [ + 835, + 843 + ], + "loc": { + "start": { + "line": 39, + "column": 12 + }, + "end": { + "line": 39, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 843, + 844 + ], + "loc": { + "start": { + "line": 39, + "column": 20 + }, "end": { "line": 39, "column": 21 diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-output.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-output.json index 1938b783..55c80c40 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-output.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-output.json @@ -2283,16 +2283,124 @@ }, { "type": "HTMLText", - "value": "The Blue Danube Waltz", + "value": "The", "range": [ 213, - 234 + 216 ], "loc": { "start": { "line": 8, "column": 8 }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 216, + 217 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "Blue", + "range": [ + 217, + 221 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 221, + 222 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "Danube", + "range": [ + 222, + 228 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 228, + 229 + ], + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "Waltz", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 8, + "column": 24 + }, "end": { "line": 8, "column": 29 @@ -2373,16 +2481,52 @@ }, { "type": "HTMLText", - "value": "Johann Strauss", + "value": "Johann", "range": [ 247, - 261 + 253 ], "loc": { "start": { "line": 9, "column": 11 }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "Strauss", + "range": [ + 254, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, "end": { "line": 9, "column": 25 @@ -2463,16 +2607,52 @@ }, { "type": "HTMLText", - "value": "European Archive", + "value": "European", "range": [ 275, - 291 + 283 ], "loc": { "start": { "line": 10, "column": 12 }, + "end": { + "line": 10, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 283, + 284 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "Archive", + "range": [ + 284, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, "end": { "line": 10, "column": 28 @@ -2769,10 +2949,10 @@ }, { "type": "HTMLText", - "value": "Mars, the Bringer of War", + "value": "Mars,", "range": [ 435, - 459 + 440 ], "loc": { "start": { @@ -2781,151 +2961,151 @@ }, "end": { "line": 16, - "column": 32 + "column": 13 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 459, - 460 + 440, + 441 ], "loc": { "start": { "line": 16, - "column": 32 + "column": 13 }, "end": { "line": 16, - "column": 33 + "column": 14 } } }, { - "type": "HTMLIdentifier", - "value": "composer", + "type": "HTMLText", + "value": "the", "range": [ - 462, - 470 + 441, + 444 ], "loc": { "start": { - "line": 17, - "column": 1 + "line": 16, + "column": 14 }, "end": { - "line": 17, - "column": 9 + "line": 16, + "column": 17 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": " ", "range": [ - 470, - 471 + 444, + 445 ], "loc": { "start": { - "line": 17, - "column": 9 + "line": 16, + "column": 17 }, "end": { - "line": 17, - "column": 10 + "line": 16, + "column": 18 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "Bringer", "range": [ - 471, - 472 + 445, + 452 ], "loc": { "start": { - "line": 17, - "column": 10 + "line": 16, + "column": 18 }, "end": { - "line": 17, - "column": 11 + "line": 16, + "column": 25 } } }, { "type": "HTMLText", - "value": "Gustav Holst", + "value": " ", "range": [ - 472, - 484 + 452, + 453 ], "loc": { "start": { - "line": 17, - "column": 11 + "line": 16, + "column": 25 }, "end": { - "line": 17, - "column": 23 + "line": 16, + "column": 26 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "of", "range": [ - 484, - 485 + 453, + 455 ], "loc": { "start": { - "line": 17, - "column": 23 + "line": 16, + "column": 26 }, "end": { - "line": 17, - "column": 24 + "line": 16, + "column": 28 } } }, { - "type": "HTMLIdentifier", - "value": "performer", + "type": "HTMLText", + "value": " ", "range": [ - 487, - 496 + 455, + 456 ], "loc": { "start": { - "line": 18, - "column": 1 + "line": 16, + "column": 28 }, "end": { - "line": 18, - "column": 10 + "line": 16, + "column": 29 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": "War", "range": [ - 496, - 497 + 456, + 459 ], "loc": { "start": { - "line": 18, - "column": 10 + "line": 16, + "column": 29 }, "end": { - "line": 18, - "column": 11 + "line": 16, + "column": 32 } } }, @@ -2933,376 +3113,1726 @@ "type": "Punctuator", "value": "\"", "range": [ - 497, - 498 + 459, + 460 ], "loc": { "start": { - "line": 18, - "column": 11 + "line": 16, + "column": 32 }, "end": { - "line": 18, - "column": 12 + "line": 16, + "column": 33 } } }, { - "type": "HTMLText", - "value": "USAF Heritage of America Band", + "type": "HTMLIdentifier", + "value": "composer", "range": [ - 498, - 527 + 462, + 470 ], "loc": { "start": { - "line": 18, - "column": 12 + "line": 17, + "column": 1 }, "end": { - "line": 18, - "column": 41 + "line": 17, + "column": 9 } } }, { "type": "Punctuator", - "value": "\"", + "value": "=", "range": [ - 527, - 528 + 470, + 471 ], "loc": { "start": { - "line": 18, - "column": 41 + "line": 17, + "column": 9 }, "end": { - "line": 18, - "column": 42 + "line": 17, + "column": 10 } } }, { "type": "Punctuator", - "value": "/", + "value": "\"", "range": [ - 529, - 530 + 471, + 472 ], "loc": { "start": { - "line": 19, - "column": 0 + "line": 17, + "column": 10 }, "end": { - "line": 19, - "column": 1 + "line": 17, + "column": 11 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "Gustav", "range": [ - 530, - 531 + 472, + 478 ], "loc": { "start": { - "line": 19, - "column": 1 + "line": 17, + "column": 11 }, "end": { - "line": 19, - "column": 2 + "line": 17, + "column": 17 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": " ", "range": [ - 531, - 533 + 478, + 479 ], "loc": { "start": { - "line": 19, - "column": 2 + "line": 17, + "column": 17 }, "end": { - "line": 21, - "column": 0 + "line": 17, + "column": 18 } } }, { - "type": "HTMLComment", - "value": "", + "type": "HTMLText", + "value": "Holst", "range": [ - 533, - 587 + 479, + 484 ], "loc": { "start": { - "line": 21, - "column": 0 + "line": 17, + "column": 18 }, "end": { - "line": 21, - "column": 54 + "line": 17, + "column": 23 } } }, { - "type": "HTMLText", - "value": "\n", + "type": "Punctuator", + "value": "\"", "range": [ - 587, - 588 + 484, + 485 ], "loc": { "start": { - "line": 21, - "column": 54 + "line": 17, + "column": 23 }, "end": { - "line": 22, - "column": 0 + "line": 17, + "column": 24 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLIdentifier", + "value": "performer", "range": [ - 588, - 589 + 487, + 496 ], "loc": { "start": { - "line": 22, - "column": 0 + "line": 18, + "column": 1 }, "end": { - "line": 22, - "column": 1 + "line": 18, + "column": 10 } } }, { - "type": "Identifier", - "value": "AudioPlayer", + "type": "Punctuator", + "value": "=", "range": [ - 589, - 600 + 496, + 497 ], "loc": { "start": { - "line": 22, - "column": 1 + "line": 18, + "column": 10 }, "end": { - "line": 22, - "column": 12 + "line": 18, + "column": 11 } } }, { - "type": "HTMLIdentifier", - "value": "src", + "type": "Punctuator", + "value": "\"", "range": [ - 602, - 605 + 497, + 498 ], "loc": { "start": { - "line": 23, - "column": 1 + "line": 18, + "column": 11 }, "end": { - "line": 23, - "column": 4 + "line": 18, + "column": 12 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": "USAF", "range": [ - 605, - 606 + 498, + 502 ], "loc": { "start": { - "line": 23, - "column": 4 + "line": 18, + "column": 12 }, "end": { - "line": 23, - "column": 5 + "line": 18, + "column": 16 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 606, - 607 + 502, + 503 ], "loc": { "start": { - "line": 23, - "column": 5 + "line": 18, + "column": 16 }, "end": { - "line": 23, - "column": 6 + "line": 18, + "column": 17 } } }, { "type": "HTMLText", - "value": "https://sveltejs.github.io/assets/music/satie.mp3", + "value": "Heritage", "range": [ - 607, - 656 + 503, + 511 ], "loc": { "start": { - "line": 23, - "column": 6 + "line": 18, + "column": 17 }, "end": { - "line": 23, - "column": 55 + "line": 18, + "column": 25 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 656, - 657 + 511, + 512 ], "loc": { "start": { - "line": 23, - "column": 55 + "line": 18, + "column": 25 }, "end": { - "line": 23, - "column": 56 + "line": 18, + "column": 26 } } }, { - "type": "HTMLIdentifier", - "value": "title", + "type": "HTMLText", + "value": "of", "range": [ - 659, - 664 + 512, + 514 ], "loc": { "start": { - "line": 24, - "column": 1 + "line": 18, + "column": 26 }, "end": { - "line": 24, - "column": 6 + "line": 18, + "column": 28 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": " ", "range": [ - 664, - 665 + 514, + 515 ], "loc": { "start": { - "line": 24, - "column": 6 + "line": 18, + "column": 28 }, "end": { - "line": 24, - "column": 7 + "line": 18, + "column": 29 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "America", "range": [ - 665, - 666 + 515, + 522 ], "loc": { "start": { - "line": 24, - "column": 7 + "line": 18, + "column": 29 }, "end": { - "line": 24, - "column": 8 + "line": 18, + "column": 36 } } }, { "type": "HTMLText", - "value": "Gymnopédie no. 1", + "value": " ", "range": [ - 666, - 682 + 522, + 523 ], "loc": { "start": { - "line": 24, - "column": 8 + "line": 18, + "column": 36 }, "end": { - "line": 24, - "column": 24 + "line": 18, + "column": 37 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "Band", "range": [ - 682, - 683 + 523, + 527 ], "loc": { "start": { - "line": 24, - "column": 24 + "line": 18, + "column": 37 }, "end": { - "line": 24, - "column": 25 + "line": 18, + "column": 41 } } }, { - "type": "HTMLIdentifier", - "value": "composer", + "type": "Punctuator", + "value": "\"", "range": [ - 685, - 693 + 527, + 528 ], "loc": { "start": { - "line": 25, + "line": 18, + "column": 41 + }, + "end": { + "line": 18, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 529, + 530 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 530, + 531 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 531, + 533 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 21, + "column": 0 + } + } + }, + { + "type": "HTMLComment", + "value": "", + "range": [ + 533, + 587 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 587, + 588 + ], + "loc": { + "start": { + "line": 21, + "column": 54 + }, + "end": { + "line": 22, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 588, + 589 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "AudioPlayer", + "range": [ + 589, + 600 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "src", + "range": [ + 602, + 605 + ], + "loc": { + "start": { + "line": 23, + "column": 1 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 605, + 606 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 606, + 607 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "https://sveltejs.github.io/assets/music/satie.mp3", + "range": [ + 607, + 656 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 55 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 656, + 657 + ], + "loc": { + "start": { + "line": 23, + "column": 55 + }, + "end": { + "line": 23, + "column": 56 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "title", + "range": [ + 659, + 664 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 664, + 665 + ], + "loc": { + "start": { + "line": 24, + "column": 6 + }, + "end": { + "line": 24, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 665, + 666 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "Gymnopédie", + "range": [ + 666, + 676 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 676, + 677 + ], + "loc": { + "start": { + "line": 24, + "column": 18 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "no.", + "range": [ + 677, + 680 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 680, + 681 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "1", + "range": [ + 681, + 682 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 682, + 683 + ], + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "composer", + "range": [ + 685, + 693 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 693, + 694 + ], + "loc": { + "start": { + "line": 25, + "column": 9 + }, + "end": { + "line": 25, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 694, + 695 + ], + "loc": { + "start": { + "line": 25, + "column": 10 + }, + "end": { + "line": 25, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "Erik", + "range": [ + 695, + 699 + ], + "loc": { + "start": { + "line": 25, + "column": 11 + }, + "end": { + "line": 25, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 699, + 700 + ], + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "Satie", + "range": [ + 700, + 705 + ], + "loc": { + "start": { + "line": 25, + "column": 16 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 705, + 706 + ], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "performer", + "range": [ + 708, + 717 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 717, + 718 + ], + "loc": { + "start": { + "line": 26, + "column": 10 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 718, + 719 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "Prodigal", + "range": [ + 719, + 727 + ], + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 727, + 728 + ], + "loc": { + "start": { + "line": 26, + "column": 20 + }, + "end": { + "line": 26, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "Procrastinator", + "range": [ + 728, + 742 + ], + "loc": { + "start": { + "line": 26, + "column": 21 + }, + "end": { + "line": 26, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 742, + 743 + ], + "loc": { + "start": { + "line": 26, + "column": 35 + }, + "end": { + "line": 26, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 744, + 745 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 745, + 746 + ], + "loc": { + "start": { + "line": 27, + "column": 1 + }, + "end": { + "line": 27, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 746, + 748 + ], + "loc": { + "start": { + "line": 27, + "column": 2 + }, + "end": { + "line": 29, + "column": 0 + } + } + }, + { + "type": "HTMLComment", + "value": "", + "range": [ + 748, + 819 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 71 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 819, + 820 + ], + "loc": { + "start": { + "line": 29, + "column": 71 + }, + "end": { + "line": 30, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 820, + 821 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "AudioPlayer", + "range": [ + 821, + 832 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 12 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "src", + "range": [ + 834, + 837 + ], + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 31, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 837, + 838 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 838, + 839 + ], + "loc": { + "start": { + "line": 31, + "column": 5 + }, + "end": { + "line": 31, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "https://sveltejs.github.io/assets/music/beethoven.mp3", + "range": [ + 839, + 892 + ], + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 59 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 892, + 893 + ], + "loc": { + "start": { + "line": 31, + "column": 59 + }, + "end": { + "line": 31, + "column": 60 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "title", + "range": [ + 895, + 900 + ], + "loc": { + "start": { + "line": 32, + "column": 1 + }, + "end": { + "line": 32, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 900, + 901 + ], + "loc": { + "start": { + "line": 32, + "column": 6 + }, + "end": { + "line": 32, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 901, + 902 + ], + "loc": { + "start": { + "line": 32, + "column": 7 + }, + "end": { + "line": 32, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "Symphony", + "range": [ + 902, + 910 + ], + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 910, + 911 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "no.", + "range": [ + 911, + 914 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 914, + 915 + ], + "loc": { + "start": { + "line": 32, + "column": 20 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "5", + "range": [ + 915, + 916 + ], + "loc": { + "start": { + "line": 32, + "column": 21 + }, + "end": { + "line": 32, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 916, + 917 + ], + "loc": { + "start": { + "line": 32, + "column": 22 + }, + "end": { + "line": 32, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 917, + 919 + ], + "loc": { + "start": { + "line": 32, + "column": 23 + }, + "end": { + "line": 32, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 919, + 920 + ], + "loc": { + "start": { + "line": 32, + "column": 25 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "Cm,", + "range": [ + 920, + 923 + ], + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 923, + 924 + ], + "loc": { + "start": { + "line": 32, + "column": 29 + }, + "end": { + "line": 32, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "Op.", + "range": [ + 924, + 927 + ], + "loc": { + "start": { + "line": 32, + "column": 30 + }, + "end": { + "line": 32, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 927, + 928 + ], + "loc": { + "start": { + "line": 32, + "column": 33 + }, + "end": { + "line": 32, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "67", + "range": [ + 928, + 930 + ], + "loc": { + "start": { + "line": 32, + "column": 34 + }, + "end": { + "line": 32, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 930, + 931 + ], + "loc": { + "start": { + "line": 32, + "column": 36 + }, + "end": { + "line": 32, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "-", + "range": [ + 931, + 932 + ], + "loc": { + "start": { + "line": 32, + "column": 37 + }, + "end": { + "line": 32, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 932, + 933 + ], + "loc": { + "start": { + "line": 32, + "column": 38 + }, + "end": { + "line": 32, + "column": 39 + } + } + }, + { + "type": "HTMLText", + "value": "I.", + "range": [ + 933, + 935 + ], + "loc": { + "start": { + "line": 32, + "column": 39 + }, + "end": { + "line": 32, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 935, + 936 + ], + "loc": { + "start": { + "line": 32, + "column": 41 + }, + "end": { + "line": 32, + "column": 42 + } + } + }, + { + "type": "HTMLText", + "value": "Allegro", + "range": [ + 936, + 943 + ], + "loc": { + "start": { + "line": 32, + "column": 42 + }, + "end": { + "line": 32, + "column": 49 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 943, + 944 + ], + "loc": { + "start": { + "line": 32, + "column": 49 + }, + "end": { + "line": 32, + "column": 50 + } + } + }, + { + "type": "HTMLText", + "value": "con", + "range": [ + 944, + 947 + ], + "loc": { + "start": { + "line": 32, + "column": 50 + }, + "end": { + "line": 32, + "column": 53 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 947, + 948 + ], + "loc": { + "start": { + "line": 32, + "column": 53 + }, + "end": { + "line": 32, + "column": 54 + } + } + }, + { + "type": "HTMLText", + "value": "brio", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 32, + "column": 54 + }, + "end": { + "line": 32, + "column": 58 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 952, + 953 + ], + "loc": { + "start": { + "line": 32, + "column": 58 + }, + "end": { + "line": 32, + "column": 59 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "composer", + "range": [ + 955, + 963 + ], + "loc": { + "start": { + "line": 33, "column": 1 }, "end": { - "line": 25, + "line": 33, "column": 9 } } @@ -3311,16 +4841,16 @@ "type": "Punctuator", "value": "=", "range": [ - 693, - 694 + 963, + 964 ], "loc": { "start": { - "line": 25, + "line": 33, "column": 9 }, "end": { - "line": 25, + "line": 33, "column": 10 } } @@ -3329,89 +4859,107 @@ "type": "Punctuator", "value": "\"", "range": [ - 694, - 695 + 964, + 965 ], "loc": { "start": { - "line": 25, + "line": 33, "column": 10 }, "end": { - "line": 25, + "line": 33, "column": 11 } } }, { "type": "HTMLText", - "value": "Erik Satie", + "value": "Ludwig", "range": [ - 695, - 705 + 965, + 971 ], "loc": { "start": { - "line": 25, + "line": 33, "column": 11 }, "end": { - "line": 25, - "column": 21 + "line": 33, + "column": 17 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 705, - 706 + 971, + 972 ], "loc": { "start": { - "line": 25, - "column": 21 + "line": 33, + "column": 17 }, "end": { - "line": 25, - "column": 22 + "line": 33, + "column": 18 } } }, { - "type": "HTMLIdentifier", - "value": "performer", + "type": "HTMLText", + "value": "van", "range": [ - 708, - 717 + 972, + 975 ], "loc": { "start": { - "line": 26, - "column": 1 + "line": 33, + "column": 18 }, "end": { - "line": 26, - "column": 10 + "line": 33, + "column": 21 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": " ", "range": [ - 717, - 718 + 975, + 976 ], "loc": { "start": { - "line": 26, - "column": 10 + "line": 33, + "column": 21 }, "end": { - "line": 26, - "column": 11 + "line": 33, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "Beethoven", + "range": [ + 976, + 985 + ], + "loc": { + "start": { + "line": 33, + "column": 22 + }, + "end": { + "line": 33, + "column": 31 } } }, @@ -3419,287 +4967,287 @@ "type": "Punctuator", "value": "\"", "range": [ - 718, - 719 + 985, + 986 ], "loc": { "start": { - "line": 26, - "column": 11 + "line": 33, + "column": 31 }, "end": { - "line": 26, - "column": 12 + "line": 33, + "column": 32 } } }, { - "type": "HTMLText", - "value": "Prodigal Procrastinator", + "type": "HTMLIdentifier", + "value": "performer", "range": [ - 719, - 742 + 988, + 997 ], "loc": { "start": { - "line": 26, - "column": 12 + "line": 34, + "column": 1 }, "end": { - "line": 26, - "column": 35 + "line": 34, + "column": 10 } } }, { "type": "Punctuator", - "value": "\"", + "value": "=", "range": [ - 742, - 743 + 997, + 998 ], "loc": { "start": { - "line": 26, - "column": 35 + "line": 34, + "column": 10 }, "end": { - "line": 26, - "column": 36 + "line": 34, + "column": 11 } } }, { "type": "Punctuator", - "value": "/", + "value": "\"", "range": [ - 744, - 745 + 998, + 999 ], "loc": { "start": { - "line": 27, - "column": 0 + "line": 34, + "column": 11 }, "end": { - "line": 27, - "column": 1 + "line": 34, + "column": 12 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "European", "range": [ - 745, - 746 + 999, + 1007 ], "loc": { "start": { - "line": 27, - "column": 1 + "line": 34, + "column": 12 }, "end": { - "line": 27, - "column": 2 + "line": 34, + "column": 20 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": " ", "range": [ - 746, - 748 + 1007, + 1008 ], "loc": { "start": { - "line": 27, - "column": 2 + "line": 34, + "column": 20 }, "end": { - "line": 29, - "column": 0 + "line": 34, + "column": 21 } } }, { - "type": "HTMLComment", - "value": "", + "type": "HTMLText", + "value": "Archive", "range": [ - 748, - 819 + 1008, + 1015 ], "loc": { "start": { - "line": 29, - "column": 0 + "line": 34, + "column": 21 }, "end": { - "line": 29, - "column": 71 + "line": 34, + "column": 28 } } }, { - "type": "HTMLText", - "value": "\n", + "type": "Punctuator", + "value": "\"", "range": [ - 819, - 820 + 1015, + 1016 ], "loc": { "start": { - "line": 29, - "column": 71 + "line": 34, + "column": 28 }, "end": { - "line": 30, - "column": 0 + "line": 34, + "column": 29 } } }, { "type": "Punctuator", - "value": "<", + "value": "/", "range": [ - 820, - 821 + 1017, + 1018 ], "loc": { "start": { - "line": 30, + "line": 35, "column": 0 }, "end": { - "line": 30, + "line": 35, "column": 1 } } }, { - "type": "Identifier", - "value": "AudioPlayer", + "type": "Punctuator", + "value": ">", "range": [ - 821, - 832 + 1018, + 1019 ], "loc": { "start": { - "line": 30, + "line": 35, "column": 1 }, "end": { - "line": 30, - "column": 12 + "line": 35, + "column": 2 } } }, { - "type": "HTMLIdentifier", - "value": "src", + "type": "HTMLText", + "value": "\n\n", "range": [ - 834, - 837 + 1019, + 1021 ], "loc": { "start": { - "line": 31, - "column": 1 + "line": 35, + "column": 2 }, - "end": { - "line": 31, - "column": 4 + "end": { + "line": 37, + "column": 0 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLComment", + "value": "", "range": [ - 837, - 838 + 1021, + 1087 ], "loc": { "start": { - "line": 31, - "column": 4 + "line": 37, + "column": 0 }, "end": { - "line": 31, - "column": 5 + "line": 37, + "column": 66 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "\n", "range": [ - 838, - 839 + 1087, + 1088 ], "loc": { "start": { - "line": 31, - "column": 5 + "line": 37, + "column": 66 }, "end": { - "line": 31, - "column": 6 + "line": 38, + "column": 0 } } }, { - "type": "HTMLText", - "value": "https://sveltejs.github.io/assets/music/beethoven.mp3", + "type": "Punctuator", + "value": "<", "range": [ - 839, - 892 + 1088, + 1089 ], "loc": { "start": { - "line": 31, - "column": 6 + "line": 38, + "column": 0 }, "end": { - "line": 31, - "column": 59 + "line": 38, + "column": 1 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "Identifier", + "value": "AudioPlayer", "range": [ - 892, - 893 + 1089, + 1100 ], "loc": { "start": { - "line": 31, - "column": 59 + "line": 38, + "column": 1 }, "end": { - "line": 31, - "column": 60 + "line": 38, + "column": 12 } } }, { "type": "HTMLIdentifier", - "value": "title", + "value": "src", "range": [ - 895, - 900 + 1102, + 1105 ], "loc": { "start": { - "line": 32, + "line": 39, "column": 1 }, "end": { - "line": 32, - "column": 6 + "line": 39, + "column": 4 } } }, @@ -3707,17 +5255,17 @@ "type": "Punctuator", "value": "=", "range": [ - 900, - 901 + 1105, + 1106 ], "loc": { "start": { - "line": 32, - "column": 6 + "line": 39, + "column": 4 }, "end": { - "line": 32, - "column": 7 + "line": 39, + "column": 5 } } }, @@ -3725,35 +5273,35 @@ "type": "Punctuator", "value": "\"", "range": [ - 901, - 902 + 1106, + 1107 ], "loc": { "start": { - "line": 32, - "column": 7 + "line": 39, + "column": 5 }, "end": { - "line": 32, - "column": 8 + "line": 39, + "column": 6 } } }, { "type": "HTMLText", - "value": "Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio", + "value": "https://sveltejs.github.io/assets/music/mozart.mp3", "range": [ - 902, - 952 + 1107, + 1157 ], "loc": { "start": { - "line": 32, - "column": 8 + "line": 39, + "column": 6 }, "end": { - "line": 32, - "column": 58 + "line": 39, + "column": 56 } } }, @@ -3761,35 +5309,35 @@ "type": "Punctuator", "value": "\"", "range": [ - 952, - 953 + 1157, + 1158 ], "loc": { "start": { - "line": 32, - "column": 58 + "line": 39, + "column": 56 }, "end": { - "line": 32, - "column": 59 + "line": 39, + "column": 57 } } }, { "type": "HTMLIdentifier", - "value": "composer", + "value": "title", "range": [ - 955, - 963 + 1160, + 1165 ], "loc": { "start": { - "line": 33, + "line": 40, "column": 1 }, "end": { - "line": 33, - "column": 9 + "line": 40, + "column": 6 } } }, @@ -3797,17 +5345,17 @@ "type": "Punctuator", "value": "=", "range": [ - 963, - 964 + 1165, + 1166 ], "loc": { "start": { - "line": 33, - "column": 9 + "line": 40, + "column": 6 }, "end": { - "line": 33, - "column": 10 + "line": 40, + "column": 7 } } }, @@ -3815,427 +5363,391 @@ "type": "Punctuator", "value": "\"", "range": [ - 964, - 965 + 1166, + 1167 ], "loc": { "start": { - "line": 33, - "column": 10 + "line": 40, + "column": 7 }, "end": { - "line": 33, - "column": 11 + "line": 40, + "column": 8 } } }, { "type": "HTMLText", - "value": "Ludwig van Beethoven", - "range": [ - 965, - 985 - ], - "loc": { - "start": { - "line": 33, - "column": 11 - }, - "end": { - "line": 33, - "column": 31 - } - } - }, - { - "type": "Punctuator", - "value": "\"", - "range": [ - 985, - 986 - ], - "loc": { - "start": { - "line": 33, - "column": 31 - }, - "end": { - "line": 33, - "column": 32 - } - } - }, - { - "type": "HTMLIdentifier", - "value": "performer", + "value": "Requiem", "range": [ - 988, - 997 + 1167, + 1174 ], "loc": { "start": { - "line": 34, - "column": 1 + "line": 40, + "column": 8 }, "end": { - "line": 34, - "column": 10 + "line": 40, + "column": 15 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": " ", "range": [ - 997, - 998 + 1174, + 1175 ], "loc": { "start": { - "line": 34, - "column": 10 + "line": 40, + "column": 15 }, "end": { - "line": 34, - "column": 11 + "line": 40, + "column": 16 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "in", "range": [ - 998, - 999 + 1175, + 1177 ], "loc": { "start": { - "line": 34, - "column": 11 + "line": 40, + "column": 16 }, "end": { - "line": 34, - "column": 12 + "line": 40, + "column": 18 } } }, { "type": "HTMLText", - "value": "European Archive", + "value": " ", "range": [ - 999, - 1015 + 1177, + 1178 ], "loc": { "start": { - "line": 34, - "column": 12 + "line": 40, + "column": 18 }, "end": { - "line": 34, - "column": 28 + "line": 40, + "column": 19 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "D", "range": [ - 1015, - 1016 + 1178, + 1179 ], "loc": { "start": { - "line": 34, - "column": 28 + "line": 40, + "column": 19 }, "end": { - "line": 34, - "column": 29 + "line": 40, + "column": 20 } } }, { - "type": "Punctuator", - "value": "/", + "type": "HTMLText", + "value": " ", "range": [ - 1017, - 1018 + 1179, + 1180 ], "loc": { "start": { - "line": 35, - "column": 0 + "line": 40, + "column": 20 }, "end": { - "line": 35, - "column": 1 + "line": 40, + "column": 21 } } }, { - "type": "Punctuator", - "value": ">", + "type": "HTMLText", + "value": "minor,", "range": [ - 1018, - 1019 + 1180, + 1186 ], "loc": { "start": { - "line": 35, - "column": 1 + "line": 40, + "column": 21 }, "end": { - "line": 35, - "column": 2 + "line": 40, + "column": 27 } } }, { "type": "HTMLText", - "value": "\n\n", + "value": " ", "range": [ - 1019, - 1021 + 1186, + 1187 ], "loc": { "start": { - "line": 35, - "column": 2 + "line": 40, + "column": 27 }, "end": { - "line": 37, - "column": 0 + "line": 40, + "column": 28 } } }, { - "type": "HTMLComment", - "value": "", + "type": "HTMLText", + "value": "K.", "range": [ - 1021, - 1087 + 1187, + 1189 ], "loc": { "start": { - "line": 37, - "column": 0 + "line": 40, + "column": 28 }, "end": { - "line": 37, - "column": 66 + "line": 40, + "column": 30 } } }, { "type": "HTMLText", - "value": "\n", + "value": " ", "range": [ - 1087, - 1088 + 1189, + 1190 ], "loc": { "start": { - "line": 37, - "column": 66 + "line": 40, + "column": 30 }, "end": { - "line": 38, - "column": 0 + "line": 40, + "column": 31 } } }, { - "type": "Punctuator", - "value": "<", + "type": "HTMLText", + "value": "626", "range": [ - 1088, - 1089 + 1190, + 1193 ], "loc": { "start": { - "line": 38, - "column": 0 + "line": 40, + "column": 31 }, "end": { - "line": 38, - "column": 1 + "line": 40, + "column": 34 } } }, { - "type": "Identifier", - "value": "AudioPlayer", + "type": "HTMLText", + "value": " ", "range": [ - 1089, - 1100 + 1193, + 1194 ], "loc": { "start": { - "line": 38, - "column": 1 + "line": 40, + "column": 34 }, "end": { - "line": 38, - "column": 12 + "line": 40, + "column": 35 } } }, { - "type": "HTMLIdentifier", - "value": "src", + "type": "HTMLText", + "value": "-", "range": [ - 1102, - 1105 + 1194, + 1195 ], "loc": { "start": { - "line": 39, - "column": 1 + "line": 40, + "column": 35 }, "end": { - "line": 39, - "column": 4 + "line": 40, + "column": 36 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": " ", "range": [ - 1105, - 1106 + 1195, + 1196 ], "loc": { "start": { - "line": 39, - "column": 4 + "line": 40, + "column": 36 }, "end": { - "line": 39, - "column": 5 + "line": 40, + "column": 37 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "III.", "range": [ - 1106, - 1107 + 1196, + 1200 ], "loc": { "start": { - "line": 39, - "column": 5 + "line": 40, + "column": 37 }, "end": { - "line": 39, - "column": 6 + "line": 40, + "column": 41 } } }, { "type": "HTMLText", - "value": "https://sveltejs.github.io/assets/music/mozart.mp3", + "value": " ", "range": [ - 1107, - 1157 + 1200, + 1201 ], "loc": { "start": { - "line": 39, - "column": 6 + "line": 40, + "column": 41 }, "end": { - "line": 39, - "column": 56 + "line": 40, + "column": 42 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": "Sequence", "range": [ - 1157, - 1158 + 1201, + 1209 ], "loc": { "start": { - "line": 39, - "column": 56 + "line": 40, + "column": 42 }, "end": { - "line": 39, - "column": 57 + "line": 40, + "column": 50 } } }, { - "type": "HTMLIdentifier", - "value": "title", + "type": "HTMLText", + "value": " ", "range": [ - 1160, - 1165 + 1209, + 1210 ], "loc": { "start": { "line": 40, - "column": 1 + "column": 50 }, "end": { "line": 40, - "column": 6 + "column": 51 } } }, { - "type": "Punctuator", - "value": "=", + "type": "HTMLText", + "value": "-", "range": [ - 1165, - 1166 + 1210, + 1211 ], "loc": { "start": { "line": 40, - "column": 6 + "column": 51 }, "end": { "line": 40, - "column": 7 + "column": 52 } } }, { - "type": "Punctuator", - "value": "\"", + "type": "HTMLText", + "value": " ", "range": [ - 1166, - 1167 + 1211, + 1212 ], "loc": { "start": { "line": 40, - "column": 7 + "column": 52 }, "end": { "line": 40, - "column": 8 + "column": 53 } } }, { "type": "HTMLText", - "value": "Requiem in D minor, K. 626 - III. Sequence - Lacrymosa", + "value": "Lacrymosa", "range": [ - 1167, + 1212, 1221 ], "loc": { "start": { "line": 40, - "column": 8 + "column": 53 }, "end": { "line": 40, @@ -4317,16 +5829,88 @@ }, { "type": "HTMLText", - "value": "Wolfgang Amadeus Mozart", + "value": "Wolfgang", "range": [ 1234, - 1257 + 1242 ], "loc": { "start": { "line": 41, "column": 11 }, + "end": { + "line": 41, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1242, + 1243 + ], + "loc": { + "start": { + "line": 41, + "column": 19 + }, + "end": { + "line": 41, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "Amadeus", + "range": [ + 1243, + 1250 + ], + "loc": { + "start": { + "line": 41, + "column": 20 + }, + "end": { + "line": 41, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1250, + 1251 + ], + "loc": { + "start": { + "line": 41, + "column": 27 + }, + "end": { + "line": 41, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "Mozart", + "range": [ + 1251, + 1257 + ], + "loc": { + "start": { + "line": 41, + "column": 28 + }, "end": { "line": 41, "column": 34 @@ -4407,16 +5991,52 @@ }, { "type": "HTMLText", - "value": "Markus Staab", + "value": "Markus", "range": [ 1271, - 1283 + 1277 ], "loc": { "start": { "line": 42, "column": 12 }, + "end": { + "line": 42, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 1277, + 1278 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "Staab", + "range": [ + 1278, + 1283 + ], + "loc": { + "start": { + "line": 42, + "column": 19 + }, "end": { "line": 42, "column": 24 diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-output.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-output.json index 91df06f5..b30092de 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-output.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-output.json @@ -4241,16 +4241,124 @@ }, { "type": "HTMLText", - "value": " / performed by ", + "value": " ", "range": [ 545, - 561 + 546 ], "loc": { "start": { "line": 29, "column": 31 }, + "end": { + "line": 29, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "/", + "range": [ + 546, + 547 + ], + "loc": { + "start": { + "line": 29, + "column": 32 + }, + "end": { + "line": 29, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 547, + 548 + ], + "loc": { + "start": { + "line": 29, + "column": 33 + }, + "end": { + "line": 29, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "performed", + "range": [ + 548, + 557 + ], + "loc": { + "start": { + "line": 29, + "column": 34 + }, + "end": { + "line": 29, + "column": 43 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 557, + 558 + ], + "loc": { + "start": { + "line": 29, + "column": 43 + }, + "end": { + "line": 29, + "column": 44 + } + } + }, + { + "type": "HTMLText", + "value": "by", + "range": [ + 558, + 560 + ], + "loc": { + "start": { + "line": 29, + "column": 44 + }, + "end": { + "line": 29, + "column": 46 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 560, + 561 + ], + "loc": { + "start": { + "line": 29, + "column": 46 + }, "end": { "line": 29, "column": 47 diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-output.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-output.json index 54efbe20..d74cf7c6 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-output.json @@ -1080,16 +1080,268 @@ }, { "type": "HTMLText", - "value": "This is a box. It can contain anything.", + "value": "This", "range": [ 80, - 119 + 84 ], "loc": { "start": { "line": 7, "column": 4 }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 85, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "box.", + "range": [ + 90, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "It", + "range": [ + 95, + 97 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "can", + "range": [ + 98, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "contain", + "range": [ + 102, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 33 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "anything.", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 7, + "column": 34 + }, "end": { "line": 7, "column": 43 diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-output.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-output.json index e7baef56..e8d30fd0 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-output.json @@ -935,16 +935,124 @@ }, { "type": "HTMLText", - "value": "no content was provided", + "value": "no", "range": [ 205, - 228 + 207 ], "loc": { "start": { "line": 14, "column": 6 }, + "end": { + "line": 14, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "content", + "range": [ + 208, + 215 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "was", + "range": [ + 216, + 219 + ], + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 219, + 220 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "provided", + "range": [ + 220, + 228 + ], + "loc": { + "start": { + "line": 14, + "column": 21 + }, "end": { "line": 14, "column": 29 diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-output.json b/tests/fixtures/parser/ast/tutorial/slot-props01-output.json index 38d892a6..06e13f2b 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-output.json @@ -1733,16 +1733,160 @@ }, { "type": "HTMLText", - "value": "I am being hovered upon.", + "value": "I", "range": [ 291, - 315 + 292 ], "loc": { "start": { "line": 21, "column": 6 }, + "end": { + "line": 21, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 292, + 293 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "am", + "range": [ + 293, + 295 + ], + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 295, + 296 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "being", + "range": [ + 296, + 301 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 21, + "column": 16 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "hovered", + "range": [ + 302, + 309 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 309, + 310 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "upon.", + "range": [ + 310, + 315 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, "end": { "line": 21, "column": 30 @@ -1931,16 +2075,88 @@ }, { "type": "HTMLText", - "value": "Hover over me!", + "value": "Hover", "range": [ 336, - 350 + 341 ], "loc": { "start": { "line": 23, "column": 6 }, + "end": { + "line": 23, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 341, + 342 + ], + "loc": { + "start": { + "line": 23, + "column": 11 + }, + "end": { + "line": 23, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "over", + "range": [ + 342, + 346 + ], + "loc": { + "start": { + "line": 23, + "column": 12 + }, + "end": { + "line": 23, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 346, + 347 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "me!", + "range": [ + 347, + 350 + ], + "loc": { + "start": { + "line": 23, + "column": 17 + }, "end": { "line": 23, "column": 20 diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-output.json b/tests/fixtures/parser/ast/tutorial/slot-props03-output.json index 20c33435..a90f7051 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-output.json @@ -1805,16 +1805,160 @@ }, { "type": "HTMLText", - "value": "I am being hovered upon.", + "value": "I", "range": [ 306, - 330 + 307 ], "loc": { "start": { "line": 21, "column": 6 }, + "end": { + "line": 21, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 307, + 308 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "am", + "range": [ + 308, + 310 + ], + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 310, + 311 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "being", + "range": [ + 311, + 316 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 316, + 317 + ], + "loc": { + "start": { + "line": 21, + "column": 16 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "hovered", + "range": [ + 317, + 324 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "upon.", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, "end": { "line": 21, "column": 30 @@ -2003,16 +2147,88 @@ }, { "type": "HTMLText", - "value": "Hover over me!", + "value": "Hover", "range": [ 351, - 365 + 356 ], "loc": { "start": { "line": 23, "column": 6 }, + "end": { + "line": 23, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 356, + 357 + ], + "loc": { + "start": { + "line": 23, + "column": 11 + }, + "end": { + "line": 23, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "over", + "range": [ + 357, + 361 + ], + "loc": { + "start": { + "line": 23, + "column": 12 + }, + "end": { + "line": 23, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 361, + 362 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "me!", + "range": [ + 362, + 365 + ], + "loc": { + "start": { + "line": 23, + "column": 17 + }, "end": { "line": 23, "column": 20 diff --git a/tests/fixtures/parser/ast/tutorial/slots01-output.json b/tests/fixtures/parser/ast/tutorial/slots01-output.json index c0d786e5..09d6fb39 100644 --- a/tests/fixtures/parser/ast/tutorial/slots01-output.json +++ b/tests/fixtures/parser/ast/tutorial/slots01-output.json @@ -1225,16 +1225,268 @@ }, { "type": "HTMLText", - "value": "This is a box. It can contain anything.", + "value": "This", "range": [ 80, - 119 + 84 ], "loc": { "start": { "line": 7, "column": 4 }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 85, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "box.", + "range": [ + 90, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "It", + "range": [ + 95, + 97 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "can", + "range": [ + 98, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": "contain", + "range": [ + 102, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 33 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "anything.", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 7, + "column": 34 + }, "end": { "line": 7, "column": 43 @@ -1459,16 +1711,196 @@ }, { "type": "HTMLText", - "value": "I'm a child of the div", + "value": "I'm", "range": [ 136, - 158 + 139 ], "loc": { "start": { "line": 9, "column": 5 }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "child", + "range": [ + 142, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "of", + "range": [ + 148, + 150 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": "the", + "range": [ + 151, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "div", + "range": [ + 155, + 158 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, "end": { "line": 9, "column": 27 diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-output.json b/tests/fixtures/parser/ast/tutorial/spread-props02-output.json index 87ab82e0..a5d2ff19 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-output.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-output.json @@ -1600,16 +1600,52 @@ }, { "type": "HTMLText", - "value": "\n\tThe ", + "value": "\n\t", "range": [ 102, - 108 + 104 ], "loc": { "start": { "line": 8, "column": 3 }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "The", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, "end": { "line": 9, "column": 5 @@ -1798,16 +1834,88 @@ }, { "type": "HTMLText", - "value": " package is ", + "value": " ", "range": [ 127, - 139 + 128 ], "loc": { "start": { "line": 9, "column": 24 }, + "end": { + "line": 9, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "package", + "range": [ + 128, + 135 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 136, + 138 + ], + "loc": { + "start": { + "line": 9, + "column": 33 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, "end": { "line": 9, "column": 36 @@ -1870,16 +1978,124 @@ }, { "type": "HTMLText", - "value": " fast.\n\tDownload version ", + "value": " ", "range": [ 146, - 171 + 147 ], "loc": { "start": { "line": 9, "column": 43 }, + "end": { + "line": 9, + "column": 44 + } + } + }, + { + "type": "HTMLText", + "value": "fast.", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 9, + "column": 44 + }, + "end": { + "line": 9, + "column": 49 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 49 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Download", + "range": [ + 154, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "version", + "range": [ + 163, + 170 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, "end": { "line": 10, "column": 18 @@ -1942,16 +2158,52 @@ }, { "type": "HTMLText", - "value": " from ", + "value": " ", "range": [ 180, - 186 + 181 ], "loc": { "start": { "line": 10, "column": 27 }, + "end": { + "line": 10, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": "from", + "range": [ + 181, + 185 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 32 + }, "end": { "line": 10, "column": 33 @@ -2248,16 +2500,52 @@ }, { "type": "HTMLText", - "value": "\n\tand ", + "value": "\n\t", "range": [ 240, - 246 + 242 ], "loc": { "start": { "line": 10, "column": 87 }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 242, + 245 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 245, + 246 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, "end": { "line": 11, "column": 5 @@ -2410,16 +2698,88 @@ }, { "type": "HTMLText", - "value": "learn more here", + "value": "learn", "range": [ 264, - 279 + 269 ], "loc": { "start": { "line": 11, "column": 23 }, + "end": { + "line": 11, + "column": 28 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "more", + "range": [ + 270, + 274 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 274, + 275 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "here", + "range": [ + 275, + 279 + ], + "loc": { + "start": { + "line": 11, + "column": 34 + }, "end": { "line": 11, "column": 38 diff --git a/tests/fixtures/parser/ast/tutorial/spring-output.json b/tests/fixtures/parser/ast/tutorial/spring-output.json index 55ef43de..2a324b38 100644 --- a/tests/fixtures/parser/ast/tutorial/spring-output.json +++ b/tests/fixtures/parser/ast/tutorial/spring-output.json @@ -4696,16 +4696,124 @@ }, { "type": "HTMLText", - "value": "position: absolute; right: 1em;", + "value": "position:", "range": [ 272, - 303 + 281 ], "loc": { "start": { "line": 16, "column": 12 }, + "end": { + "line": 16, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 21 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "absolute;", + "range": [ + 282, + 291 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 16, + "column": 31 + }, + "end": { + "line": 16, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": "right:", + "range": [ + 292, + 298 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 298, + 299 + ], + "loc": { + "start": { + "line": 16, + "column": 38 + }, + "end": { + "line": 16, + "column": 39 + } + } + }, + { + "type": "HTMLText", + "value": "1em;", + "range": [ + 299, + 303 + ], + "loc": { + "start": { + "line": 16, + "column": 39 + }, "end": { "line": 16, "column": 43 @@ -4894,16 +5002,52 @@ }, { "type": "HTMLText", - "value": "stiffness (", + "value": "stiffness", "range": [ 321, - 332 + 330 ], "loc": { "start": { "line": 18, "column": 6 }, + "end": { + "line": 18, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "(", + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, "end": { "line": 18, "column": 17 @@ -5920,16 +6064,52 @@ }, { "type": "HTMLText", - "value": "damping (", + "value": "damping", "range": [ 464, - 473 + 471 ], "loc": { "start": { "line": 23, "column": 6 }, + "end": { + "line": 23, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 23, + "column": 13 + }, + "end": { + "line": 23, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "(", + "range": [ + 472, + 473 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, "end": { "line": 23, "column": 15 diff --git a/tests/fixtures/parser/ast/tutorial/styling01-output.json b/tests/fixtures/parser/ast/tutorial/styling01-output.json index a722528c..5063116a 100644 --- a/tests/fixtures/parser/ast/tutorial/styling01-output.json +++ b/tests/fixtures/parser/ast/tutorial/styling01-output.json @@ -424,16 +424,124 @@ }, { "type": "HTMLText", - "value": "This is a paragraph.", + "value": "This", "range": [ 43, - 63 + 47 ], "loc": { "start": { "line": 5, "column": 3 }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 48, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "paragraph.", + "range": [ + 53, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, "end": { "line": 5, "column": 23 diff --git a/tests/fixtures/parser/ast/tutorial/styling02-output.json b/tests/fixtures/parser/ast/tutorial/styling02-output.json index ceed22aa..b9eb74d2 100644 --- a/tests/fixtures/parser/ast/tutorial/styling02-output.json +++ b/tests/fixtures/parser/ast/tutorial/styling02-output.json @@ -424,16 +424,124 @@ }, { "type": "HTMLText", - "value": "This is a paragraph.", + "value": "This", "range": [ 105, - 125 + 109 ], "loc": { "start": { "line": 9, "column": 3 }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 110, + 112 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 112, + 113 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "paragraph.", + "range": [ + 115, + 125 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, "end": { "line": 9, "column": 23 diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-output.json b/tests/fixtures/parser/ast/tutorial/svelte-body-output.json index d2ffea6d..ab0076f5 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-output.json @@ -2393,16 +2393,232 @@ }, { "type": "HTMLText", - "value": "Kitten wants to know what's going on", + "value": "Kitten", "range": [ 638, - 674 + 644 ], "loc": { "start": { "line": 35, "column": 6 }, + "end": { + "line": 35, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 644, + 645 + ], + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "wants", + "range": [ + 645, + 650 + ], + "loc": { + "start": { + "line": 35, + "column": 13 + }, + "end": { + "line": 35, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 650, + 651 + ], + "loc": { + "start": { + "line": 35, + "column": 18 + }, + "end": { + "line": 35, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "to", + "range": [ + 651, + 653 + ], + "loc": { + "start": { + "line": 35, + "column": 19 + }, + "end": { + "line": 35, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 653, + 654 + ], + "loc": { + "start": { + "line": 35, + "column": 21 + }, + "end": { + "line": 35, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": "know", + "range": [ + 654, + 658 + ], + "loc": { + "start": { + "line": 35, + "column": 22 + }, + "end": { + "line": 35, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 658, + 659 + ], + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "what's", + "range": [ + 659, + 665 + ], + "loc": { + "start": { + "line": 35, + "column": 27 + }, + "end": { + "line": 35, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 665, + 666 + ], + "loc": { + "start": { + "line": 35, + "column": 33 + }, + "end": { + "line": 35, + "column": 34 + } + } + }, + { + "type": "HTMLText", + "value": "going", + "range": [ + 666, + 671 + ], + "loc": { + "start": { + "line": 35, + "column": 34 + }, + "end": { + "line": 35, + "column": 39 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 671, + 672 + ], + "loc": { + "start": { + "line": 35, + "column": 39 + }, + "end": { + "line": 35, + "column": 40 + } + } + }, + { + "type": "HTMLText", + "value": "on", + "range": [ + 672, + 674 + ], + "loc": { + "start": { + "line": 35, + "column": 40 + }, "end": { "line": 35, "column": 42 diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-output.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-output.json index ed3329d7..0090fb32 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-output.json @@ -1154,16 +1154,88 @@ }, { "type": "HTMLText", - "value": "All rights reserved.", + "value": "All", "range": [ 96, - 116 + 99 ], "loc": { "start": { "line": 7, "column": 5 }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "rights", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "reserved.", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, "end": { "line": 7, "column": 25 @@ -1316,16 +1388,160 @@ }, { "type": "HTMLText", - "value": "Copyright (c) 2019 Svelte Industries", + "value": "Copyright", "range": [ 126, - 162 + 135 ], "loc": { "start": { "line": 8, "column": 5 }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "(c)", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "2019", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "Svelte", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "Industries", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, "end": { "line": 8, "column": 41 diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-output.json b/tests/fixtures/parser/ast/tutorial/svelte-head-output.json index 21046c8f..5f31c0a8 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-output.json @@ -865,16 +865,52 @@ }, { "type": "HTMLText", - "value": "Hello world!", + "value": "Hello", "range": [ 90, - 102 + 95 ], "loc": { "start": { "line": 5, "column": 4 }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "world!", + "range": [ + 96, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, "end": { "line": 5, "column": 16 diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-output.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-output.json index 02ad97e9..6a906ec3 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-output.json @@ -1589,16 +1589,52 @@ }, { "type": "HTMLText", - "value": "background-image: url(tutorial/icons/", + "value": "background-image:", "range": [ 215, - 252 + 232 ], "loc": { "start": { "line": 14, "column": 13 }, + "end": { + "line": 14, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 232, + 233 + ], + "loc": { + "start": { + "line": 14, + "column": 30 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + { + "type": "HTMLText", + "value": "url(tutorial/icons/", + "range": [ + 233, + 252 + ], + "loc": { + "start": { + "line": 14, + "column": 31 + }, "end": { "line": 14, "column": 50 diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-output.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-output.json index c9d08f4d..63396ba1 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-output.json @@ -3509,16 +3509,52 @@ }, { "type": "HTMLText", - "value": "transform: translate(0,", + "value": "transform:", "range": [ 219, - 242 + 229 ], "loc": { "start": { "line": 12, "column": 10 }, + "end": { + "line": 12, + "column": 20 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "translate(0,", + "range": [ + 230, + 242 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, "end": { "line": 12, "column": 33 @@ -4031,16 +4067,70 @@ }, { "type": "HTMLText", - "value": "parallax layer ", + "value": "parallax", "range": [ 364, - 379 + 372 ], "loc": { "start": { "line": 14, "column": 8 }, + "end": { + "line": 14, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 372, + 373 + ], + "loc": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "layer", + "range": [ + 373, + 378 + ], + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, "end": { "line": 14, "column": 23 @@ -4553,16 +4643,34 @@ }, { "type": "HTMLText", - "value": "opacity: ", + "value": "opacity:", "range": [ 440, - 449 + 448 ], "loc": { "start": { "line": 20, "column": 14 }, + "end": { + "line": 20, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 448, + 449 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, "end": { "line": 20, "column": 23 @@ -4859,16 +4967,88 @@ }, { "type": "HTMLText", - "value": "\n\t\tscroll down\n\t", + "value": "\n\t\t", "range": [ 476, - 492 + 479 ], "loc": { "start": { "line": 20, "column": 50 }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "scroll", + "range": [ + 479, + 485 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 485, + 486 + ], + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "down", + "range": [ + 486, + 490 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 490, + 492 + ], + "loc": { + "start": { + "line": 21, + "column": 13 + }, "end": { "line": 22, "column": 1 @@ -5111,16 +5291,124 @@ }, { "type": "HTMLText", - "value": "\n\t\tYou have scrolled ", + "value": "\n\t\t", "range": [ 526, - 547 + 529 ], "loc": { "start": { "line": 24, "column": 25 }, + "end": { + "line": 25, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "You", + "range": [ + 529, + 532 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 532, + 533 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "have", + "range": [ + 533, + 537 + ], + "loc": { + "start": { + "line": 25, + "column": 6 + }, + "end": { + "line": 25, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 537, + 538 + ], + "loc": { + "start": { + "line": 25, + "column": 10 + }, + "end": { + "line": 25, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "scrolled", + "range": [ + 538, + 546 + ], + "loc": { + "start": { + "line": 25, + "column": 11 + }, + "end": { + "line": 25, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 546, + 547 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, "end": { "line": 25, "column": 20 @@ -5183,16 +5471,52 @@ }, { "type": "HTMLText", - "value": " pixels\n\t", + "value": " ", "range": [ 550, - 559 + 551 ], "loc": { "start": { "line": 25, "column": 23 }, + "end": { + "line": 25, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "pixels", + "range": [ + 551, + 557 + ], + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 557, + 559 + ], + "loc": { + "start": { + "line": 25, + "column": 30 + }, "end": { "line": 26, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-output.json b/tests/fixtures/parser/ast/tutorial/svelte-window-output.json index 3047e898..0082b817 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-output.json @@ -2467,16 +2467,52 @@ }, { "type": "HTMLText", - "value": "text-align: center", + "value": "text-align:", "range": [ 619, - 637 + 630 ], "loc": { "start": { "line": 35, "column": 12 }, + "end": { + "line": 35, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 630, + 631 + ], + "loc": { + "start": { + "line": 35, + "column": 23 + }, + "end": { + "line": 35, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "center", + "range": [ + 631, + 637 + ], + "loc": { + "start": { + "line": 35, + "column": 24 + }, "end": { "line": 35, "column": 30 @@ -3205,16 +3241,232 @@ }, { "type": "HTMLText", - "value": "Focus this window and press any key", + "value": "Focus", "range": [ 727, - 762 + 732 ], "loc": { "start": { "line": 40, "column": 5 }, + "end": { + "line": 40, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 732, + 733 + ], + "loc": { + "start": { + "line": 40, + "column": 10 + }, + "end": { + "line": 40, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "this", + "range": [ + 733, + 737 + ], + "loc": { + "start": { + "line": 40, + "column": 11 + }, + "end": { + "line": 40, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 737, + 738 + ], + "loc": { + "start": { + "line": 40, + "column": 15 + }, + "end": { + "line": 40, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "window", + "range": [ + 738, + 744 + ], + "loc": { + "start": { + "line": 40, + "column": 16 + }, + "end": { + "line": 40, + "column": 22 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 744, + 745 + ], + "loc": { + "start": { + "line": 40, + "column": 22 + }, + "end": { + "line": 40, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 745, + 748 + ], + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 748, + 749 + ], + "loc": { + "start": { + "line": 40, + "column": 26 + }, + "end": { + "line": 40, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "press", + "range": [ + 749, + 754 + ], + "loc": { + "start": { + "line": 40, + "column": 27 + }, + "end": { + "line": 40, + "column": 32 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 754, + 755 + ], + "loc": { + "start": { + "line": 40, + "column": 32 + }, + "end": { + "line": 40, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "any", + "range": [ + 755, + 758 + ], + "loc": { + "start": { + "line": 40, + "column": 33 + }, + "end": { + "line": 40, + "column": 36 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 758, + 759 + ], + "loc": { + "start": { + "line": 40, + "column": 36 + }, + "end": { + "line": 40, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "key", + "range": [ + 759, + 762 + ], + "loc": { + "start": { + "line": 40, + "column": 37 + }, "end": { "line": 40, "column": 40 diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-output.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-output.json index 25ce6998..a827599e 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-output.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-output.json @@ -952,16 +952,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 72, - 78 + 77 ], "loc": { "start": { "line": 7, "column": 4 }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, "end": { "line": 7, "column": 10 diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-output.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-output.json index d5d5e7e5..e06e70f6 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-output.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-output.json @@ -918,16 +918,34 @@ }, { "type": "HTMLText", - "value": "Hello ", + "value": "Hello", "range": [ 67, - 73 + 72 ], "loc": { "start": { "line": 7, "column": 4 }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, "end": { "line": 7, "column": 10 diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-output.json b/tests/fixtures/parser/ast/tutorial/transition-events-output.json index a7f896f9..d25a4fec 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-events-output.json +++ b/tests/fixtures/parser/ast/tutorial/transition-events-output.json @@ -2148,16 +2148,34 @@ }, { "type": "HTMLText", - "value": "status: ", + "value": "status:", "range": [ 115, - 123 + 122 ], "loc": { "start": { "line": 8, "column": 3 }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, "end": { "line": 8, "column": 11 @@ -2652,16 +2670,52 @@ }, { "type": "HTMLText", - "value": "\n\tvisible\n", + "value": "\n\t", "range": [ 192, - 202 + 194 ], "loc": { "start": { "line": 11, "column": 47 }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "visible", + "range": [ + 194, + 201 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, "end": { "line": 13, "column": 0 @@ -4200,16 +4254,160 @@ }, { "type": "HTMLText", - "value": "\n\t\tFlies in and out\n\t", + "value": "\n\t\t", "range": [ 476, - 497 + 479 ], "loc": { "start": { "line": 22, "column": 2 }, + "end": { + "line": 23, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Flies", + "range": [ + 479, + 484 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 485, + 487 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 487, + 488 + ], + "loc": { + "start": { + "line": 23, + "column": 10 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 488, + 491 + ], + "loc": { + "start": { + "line": 23, + "column": 11 + }, + "end": { + "line": 23, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 492, + 495 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 495, + 497 + ], + "loc": { + "start": { + "line": 23, + "column": 18 + }, "end": { "line": 24, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/transition-output.json b/tests/fixtures/parser/ast/tutorial/transition-output.json index 3a0bc95e..e14467f1 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-output.json +++ b/tests/fixtures/parser/ast/tutorial/transition-output.json @@ -1468,16 +1468,52 @@ }, { "type": "HTMLText", - "value": "\n\tvisible\n", + "value": "\n\t", "range": [ 139, - 149 + 141 ], "loc": { "start": { "line": 7, "column": 47 }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "visible", + "range": [ + 141, + 148 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 148, + 149 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, "end": { "line": 9, "column": 0 @@ -1756,16 +1792,160 @@ }, { "type": "HTMLText", - "value": "\n\t\tFades in and out\n\t", + "value": "\n\t\t", "range": [ 193, - 214 + 196 ], "loc": { "start": { "line": 12, "column": 20 }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Fades", + "range": [ + 196, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "in", + "range": [ + 202, + 204 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "and", + "range": [ + 205, + 208 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "HTMLText", + "value": "out", + "range": [ + 209, + 212 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 212, + 214 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, "end": { "line": 14, "column": 1 diff --git a/tests/fixtures/parser/ast/tutorial/tweened-output.json b/tests/fixtures/parser/ast/tutorial/tweened-output.json index c3f6eea3..f1462799 100644 --- a/tests/fixtures/parser/ast/tutorial/tweened-output.json +++ b/tests/fixtures/parser/ast/tutorial/tweened-output.json @@ -3664,16 +3664,52 @@ }, { "type": "HTMLText", - "value": "\n\t0%\n", + "value": "\n\t", "range": [ 328, - 333 + 330 ], "loc": { "start": { "line": 20, "column": 43 }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "0%", + "range": [ + 330, + 332 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 332, + 333 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, "end": { "line": 22, "column": 0 @@ -4132,16 +4168,52 @@ }, { "type": "HTMLText", - "value": "\n\t25%\n", + "value": "\n\t", "range": [ 390, - 396 + 392 ], "loc": { "start": { "line": 24, "column": 46 }, + "end": { + "line": 25, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "25%", + "range": [ + 392, + 395 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 395, + 396 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, "end": { "line": 26, "column": 0 @@ -4600,16 +4672,52 @@ }, { "type": "HTMLText", - "value": "\n\t50%\n", + "value": "\n\t", "range": [ 452, - 458 + 454 ], "loc": { "start": { "line": 28, "column": 45 }, + "end": { + "line": 29, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "50%", + "range": [ + 454, + 457 + ], + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 29, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 457, + 458 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, "end": { "line": 30, "column": 0 @@ -5068,16 +5176,52 @@ }, { "type": "HTMLText", - "value": "\n\t75%\n", + "value": "\n\t", "range": [ 515, - 521 + 517 ], "loc": { "start": { "line": 32, "column": 46 }, + "end": { + "line": 33, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "75%", + "range": [ + 517, + 520 + ], + "loc": { + "start": { + "line": 33, + "column": 1 + }, + "end": { + "line": 33, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 520, + 521 + ], + "loc": { + "start": { + "line": 33, + "column": 4 + }, "end": { "line": 34, "column": 0 @@ -5536,16 +5680,52 @@ }, { "type": "HTMLText", - "value": "\n\t100%\n", + "value": "\n\t", "range": [ 575, - 582 + 577 ], "loc": { "start": { "line": 36, "column": 43 }, + "end": { + "line": 37, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "100%", + "range": [ + 577, + 581 + ], + "loc": { + "start": { + "line": 37, + "column": 1 + }, + "end": { + "line": 37, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 581, + 582 + ], + "loc": { + "start": { + "line": 37, + "column": 5 + }, "end": { "line": 38, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-output.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-output.json index f39954df..7319ac05 100644 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-output.json +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-output.json @@ -2611,16 +2611,52 @@ }, { "type": "HTMLText", - "value": " = ", + "value": " ", "range": [ 205, - 208 + 206 ], "loc": { "start": { "line": 12, "column": 24 }, + "end": { + "line": 12, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "=", + "range": [ + 206, + 207 + ], + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 12, + "column": 26 + }, "end": { "line": 12, "column": 27 @@ -2953,16 +2989,124 @@ }, { "type": "HTMLText", - "value": "\n\tAdd a number\n", + "value": "\n\t", "range": [ 248, - 263 + 250 ], "loc": { "start": { "line": 14, "column": 29 }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "Add", + "range": [ + 250, + 253 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "HTMLText", + "value": "a", + "range": [ + 254, + 255 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "number", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, "end": { "line": 16, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-output.json index 1fa53156..6ea93abb 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-output.json @@ -2032,16 +2032,106 @@ }, { "type": "HTMLText", - "value": "The count is ", + "value": "The", "range": [ 299, - 312 + 302 ], "loc": { "start": { "line": 14, "column": 4 }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 302, + 303 + ], + "loc": { + "start": { + "line": 14, + "column": 7 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "count", + "range": [ + 303, + 308 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 309, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 311, + 312 + ], + "loc": { + "start": { + "line": 14, + "column": 16 + }, "end": { "line": 14, "column": 17 diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-output.json index 9f21e2ed..84ac5a2c 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-output.json @@ -1356,16 +1356,52 @@ }, { "type": "HTMLText", - "value": "\n\t-\n", + "value": "\n\t", "range": [ 143, - 147 + 145 ], "loc": { "start": { "line": 9, "column": 29 }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "-", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, "end": { "line": 11, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-output.json index caf4dbf4..af336370 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-output.json @@ -1356,16 +1356,52 @@ }, { "type": "HTMLText", - "value": "\n\t+\n", + "value": "\n\t", "range": [ 143, - 147 + 145 ], "loc": { "start": { "line": 9, "column": 29 }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "+", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, "end": { "line": 11, "column": 0 diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-output.json index 28cdfb9f..55f17481 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-output.json @@ -1207,16 +1207,52 @@ }, { "type": "HTMLText", - "value": "\n\treset\n", + "value": "\n\t", "range": [ 123, - 131 + 125 ], "loc": { "start": { "line": 9, "column": 25 }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "reset", + "range": [ + 125, + 130 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, "end": { "line": 11, "column": 0