diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-08-12 19:54:46 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-08-12 19:54:46 +0200 |
commit | d22c3b0c257f5daf5b401988a35ab9ce981a2341 (patch) | |
tree | 0a661c927c37b52197326d1c05e211daf9bd19e5 /subprojects/frontend/src/language/folding.ts | |
parent | fix(language): rule parsing test (diff) | |
download | refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.gz refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.zst refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.zip |
refactor(frontend): move from Webpack to Vite
Also overhaulds the building and linting for frontend assets.
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; |