diff options
Diffstat (limited to 'subprojects/frontend/src/language/folding.ts')
-rw-r--r-- | subprojects/frontend/src/language/folding.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/subprojects/frontend/src/language/folding.ts b/subprojects/frontend/src/language/folding.ts index 2560c183..9d1c04a3 100644 --- a/subprojects/frontend/src/language/folding.ts +++ b/subprojects/frontend/src/language/folding.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { EditorState } from '@codemirror/state'; | 1 | import type { EditorState } from '@codemirror/state'; |
2 | import type { SyntaxNode } from '@lezer/common'; | 2 | import type { SyntaxNode } from '@lezer/common'; |
3 | 3 | ||
4 | export type FoldRange = { from: number, to: number }; | 4 | export type FoldRange = { from: number; to: number }; |
5 | 5 | ||
6 | /** | 6 | /** |
7 | * Folds a block comment between its delimiters. | 7 | * Folds a block comment between its delimiters. |
@@ -47,7 +47,10 @@ export function foldBlockComment(node: SyntaxNode): FoldRange { | |||
47 | * @param state the editor state | 47 | * @param state the editor state |
48 | * @returns the folding range or `null` is there is nothing to fold | 48 | * @returns the folding range or `null` is there is nothing to fold |
49 | */ | 49 | */ |
50 | export function foldDeclaration(node: SyntaxNode, state: EditorState): FoldRange | null { | 50 | export function foldDeclaration( |
51 | node: SyntaxNode, | ||
52 | state: EditorState, | ||
53 | ): FoldRange | null { | ||
51 | const { firstChild: open, lastChild: close } = node; | 54 | const { firstChild: open, lastChild: close } = node; |
52 | if (open === null || close === null) { | 55 | if (open === null || close === null) { |
53 | return null; | 56 | return null; |