Skip to content

Commit

Permalink
fix tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Jun 27, 2021
1 parent c534da3 commit c5dd882
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 60 deletions.
4 changes: 2 additions & 2 deletions test/runtime/samples/const-tag-hoisting/main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<div>{n} ^ 4 = {hypercubed}</div>

{@const squared = n * n}
{@const cubed = squared * n}
{@const hypercubed = cubed * n}
{@const cubed = squared * n}
{@const hypercubed = cubed * n}
{/each}
4 changes: 2 additions & 2 deletions test/runtime/samples/const-tag-ordering/main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<div>{n} ^ 4 = {hypercubed}</div>

{@const squared = n * n}
{@const cubed = squared * n}
{@const hypercubed = cubed * n}
{@const cubed = squared * n}
{@const hypercubed = cubed * n}
{/each}
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-conflict-1/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "invalid-const-declaration",
"message": "'a' has already been declared",
"start": { "line": 7, "column": 2, "character": 84 },
"end": { "line": 7, "column": 19, "character": 101 },
"pos": 84
}]
[
{
"code": "invalid-const-declaration",
"message": "'a' has already been declared",
"start": { "line": 7, "column": 2, "character": 84 },
"end": { "line": 7, "column": 19, "character": 101 },
"pos": 84
}
]
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-conflict-2/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "invalid-const-declaration",
"message": "'item' has already been declared",
"start": { "line": 6, "column": 2, "character": 64 },
"end": { "line": 6, "column": 21, "character": 83 },
"pos": 64
}]
[
{
"code": "invalid-const-declaration",
"message": "'item' has already been declared",
"start": { "line": 6, "column": 2, "character": 64 },
"end": { "line": 6, "column": 21, "character": 83 },
"pos": 64
}
]
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-cyclical/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "cyclical-constant-tags",
"message": "Cyclical dependency detected: b → c → b",
"start": { "line": 6, "column": 2, "character": 61 },
"end": { "line": 6, "column": 20, "character": 79 },
"pos": 61
}]
[
{
"code": "cyclical-constant-tags",
"message": "Cyclical dependency detected: b → c → b",
"start": { "line": 6, "column": 2, "character": 61 },
"end": { "line": 6, "column": 20, "character": 79 },
"pos": 61
}
]
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-placement-1/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "invalid-const-placement",
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
"start": { "line": 5, "column": 0, "character": 36 },
"end": { "line": 5, "column": 18, "character": 54 },
"pos": 36
}]
[
{
"code": "invalid-const-placement",
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
"start": { "line": 5, "column": 0, "character": 36 },
"end": { "line": 5, "column": 18, "character": 54 },
"pos": 36
}
]
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-placement-2/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "invalid-const-placement",
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
"start": { "line": 6, "column": 2, "character": 46 },
"end": { "line": 6, "column": 20, "character": 64 },
"pos": 46
}]
[
{
"code": "invalid-const-placement",
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
"start": { "line": 6, "column": 2, "character": 46 },
"end": { "line": 6, "column": 20, "character": 64 },
"pos": 46
}
]
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-placement-3/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "invalid-const-placement",
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
"start": { "line": 7, "column": 4, "character": 63 },
"end": { "line": 7, "column": 18, "character": 77 },
"pos": 63
}]
[
{
"code": "invalid-const-placement",
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
"start": { "line": 7, "column": 4, "character": 63 },
"end": { "line": 7, "column": 18, "character": 77 },
"pos": 63
}
]
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-readonly-1/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "invalid-const-update",
"message": "'b' is declared using {@const ...} and it is read-only",
"start": { "line": 7, "column": 26, "character": 106 },
"end": { "line": 7, "column": 30, "character": 110 },
"pos": 106
}]
[
{
"code": "invalid-const-update",
"message": "'b' is declared using {@const ...} and it is read-only",
"start": { "line": 7, "column": 26, "character": 106 },
"end": { "line": 7, "column": 30, "character": 110 },
"pos": 106
}
]
16 changes: 9 additions & 7 deletions test/validator/samples/const-tag-readonly-2/errors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[{
"code": "invalid-binding",
"message": "Cannot bind to a variable declared with {@const ...}",
"start": { "line": 7, "column": 9, "character": 89 },
"end": { "line": 7, "column": 23, "character": 103 },
"pos": 89
}]
[
{
"code": "invalid-binding",
"message": "Cannot bind to a variable declared with {@const ...}",
"start": { "line": 7, "column": 9, "character": 89 },
"end": { "line": 7, "column": 23, "character": 103 },
"pos": 89
}
]

0 comments on commit c5dd882

Please sign in to comment.