-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add syntax highligthing to lezer grammar (#198)
* feat: add syntax highligthing to lezer grammar * add If EndIf as keywords * fix: scenario highlighting * fix: now comment is seen as a statement * fix: and color * add Foreach statement * fix: add newline to the end of the statements * fix: errors wrong colors * fix:update test cases * fix:add missing licenses
- Loading branch information
1 parent
b812202
commit ab68052
Showing
6 changed files
with
346 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// SPDX-FileCopyrightText: 2024 Dyne.org foundation | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
export const eof: number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-FileCopyrightText: 2024 Dyne.org foundation | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
import {ExternalTokenizer} from "@lezer/lr" | ||
import { eof } from "./syntax.grammar.terms" | ||
|
||
export const token = new ExternalTokenizer( | ||
(input) => { | ||
if (input.next < 0) { | ||
input.acceptToken(eof); | ||
} | ||
}, | ||
{ contextual: true, fallback: true } | ||
); |
Oops, something went wrong.