Skip to content

Commit a333d4b

Browse files
authored
Tidy up parser (#10407)
* tidy up parser a bit * better --------- Co-authored-by: Rich Harris <[email protected]>
1 parent 08b4d35 commit a333d4b

File tree

6 files changed

+137
-145
lines changed

6 files changed

+137
-145
lines changed

packages/svelte/src/compiler/phases/1-parse/read/context.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import { error } from '../../../errors.js';
1313

1414
/**
1515
* @param {import('../index.js').Parser} parser
16-
* @returns {any}
16+
* @returns {import('estree').Pattern}
1717
*/
18-
export default function read_context(parser) {
18+
export default function read_pattern(parser) {
1919
const start = parser.index;
2020
let i = parser.index;
2121

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default function tag(parser) {
6565
const data = parser.read_until(regex_closing_comment);
6666
parser.eat('-->', true);
6767

68+
/** @type {ReturnType<typeof parser.append<import('#compiler').Comment>>} */
6869
parser.append({
6970
type: 'Comment',
7071
start,

0 commit comments

Comments
 (0)