Skip to content

Commit

Permalink
feat: lezer grammar to generate parsers for codemirror AST (#191)
Browse files Browse the repository at this point in the history
* chore: Initial lezer grammar work

* feat: first version support only  Given I/Then I slangroom statement

* better token definition

* feat: add rule support

* feat: add Given I have statement

* feat: add Given I am statement

* feat: add When statement

* fix: remove duplicated keywords

* fix: update GivenHave and ThenPrint statements

* feat: add if/endif statement

* add scenario statement

---------

Co-authored-by: puria <[email protected]>
  • Loading branch information
FilippoTrotter and puria authored Aug 23, 2024
1 parent cba3bfe commit 5620996
Show file tree
Hide file tree
Showing 3 changed files with 427 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,8 @@ node_modules
# pocketbase files
!/pkg/**/*.pb.js
!/pkg/pocketbase/test/pb_migrations/*.js


# grammar lezer
!/grammar/Makefile
!/grammar/slangroom.grammar
2 changes: 2 additions & 0 deletions grammar/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
slangroom.js:
lezer-generator slangroom.grammar -o slangroom.js
Loading

0 comments on commit 5620996

Please sign in to comment.