Skip to content

Commit

Permalink
go: generate formatted parser (#260)
Browse files Browse the repository at this point in the history
The go parser is currently generated and then formatted. This however
requires that go is installed when generating the parser. This
added dependency makes code generation more complicated than it needs
to be as this is yet another tool people need to install.

This in turn makes #154 more complicated than it needs to be.

By making the code generator generate formatted code we avoid this
problem all together.
  • Loading branch information
mpkorstanje authored Aug 2, 2024
1 parent 01587aa commit 47ce60a
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 193 deletions.
1 change: 0 additions & 1 deletion go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ dialects_builtin.go: ../gherkin-languages.json dialects_builtin.go.jq

$(GHERKIN_PARSER): $(GHERKIN_RAZOR) ../gherkin.berp
berp -g ../gherkin.berp -t $< -o $@ --noBOM
gofmt -w $@

acceptance/testdata/%.tokens: ../testdata/% ../testdata/%.tokens
mkdir -p $(@D)
Expand Down
1 change: 0 additions & 1 deletion go/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ type RuleType int

const (
RuleTypeNone RuleType = iota

RuleTypeEOF
RuleTypeEmpty
RuleTypeComment
Expand Down
Loading

0 comments on commit 47ce60a

Please sign in to comment.