Skip to content

Commit 1cc6a32

Browse files
authored
fix: ConstTag AST tweak (#11196)
VariableDeclaration should start at `const`, not at `@const` As a side-effect, this will create less diff noise for language tools tests
1 parent 1c33ff0 commit 1cc6a32

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/compiler/phases/1-parse/state

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/phases/1-parse/state/tag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ function special(parser) {
565565
type: 'VariableDeclaration',
566566
kind: 'const',
567567
declarations: [{ type: 'VariableDeclarator', id, init }],
568-
start: start + 1,
568+
start: start + 2, // start at const, not at @const
569569
end: parser.index - 1
570570
}
571571
});

0 commit comments

Comments
 (0)