Skip to content

Commit 3c3360c

Browse files
committed
chore: remove analysis.state.title
1 parent 4e048f1 commit 3c3360c

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

packages/svelte/src/compiler/phases/2-analyze/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ export function analyze_module(source, options) {
303303
has_props_rune: false,
304304
options: /** @type {ValidatedCompileOptions} */ (options),
305305
fragment: null,
306-
title: null,
307306
parent_element: null,
308307
reactive_statement: null
309308
},
@@ -694,7 +693,6 @@ export function analyze_component(root, source, options) {
694693
options,
695694
ast_type: ast === instance.ast ? 'instance' : ast === template.ast ? 'template' : 'module',
696695
fragment: ast === template.ast ? ast : null,
697-
title: null,
698696
parent_element: null,
699697
has_props_rune: false,
700698
component_slots: new Set(),
@@ -761,7 +759,6 @@ export function analyze_component(root, source, options) {
761759
analysis,
762760
options,
763761
fragment: ast === template.ast ? ast : null,
764-
title: null,
765762
parent_element: null,
766763
has_props_rune: false,
767764
ast_type: ast === instance.ast ? 'instance' : ast === template.ast ? 'template' : 'module',

packages/svelte/src/compiler/phases/2-analyze/types.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export interface AnalysisState {
99
options: ValidatedCompileOptions;
1010
ast_type: 'instance' | 'template' | 'module';
1111
fragment: AST.Fragment | null;
12-
title: AST.TitleElement | null;
1312
/**
1413
* Tag name of the parent element. `null` if the parent is `svelte:element`, `#snippet`, a component or the root.
1514
* Parent doesn't necessarily mean direct path predecessor because there could be `#each`, `#if` etc in-between.

packages/svelte/src/compiler/phases/2-analyze/visitors/AwaitExpression.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ export function AwaitExpression(node, context) {
2020
suspend = true;
2121
}
2222

23-
if (context.state.title) {
24-
context.state.title.metadata.has_await = true;
25-
}
26-
2723
// disallow top-level `await` or `await` in template expressions
2824
// unless a) in runes mode and b) opted into `experimental.async`
2925
if (suspend) {

packages/svelte/src/compiler/phases/2-analyze/visitors/TitleElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export function TitleElement(node, context) {
1717
}
1818
}
1919

20-
context.visit(node.fragment, { ...context.state, title: node });
20+
context.visit(node.fragment);
2121
}

0 commit comments

Comments
 (0)