Skip to content

Commit

Permalink
fix: scanner: make state_new() static (#17)
Browse files Browse the repository at this point in the history
I suspect this is what causing issues for multiple projects attempting to use this grammar:

- neurocyte/zat#1

- zed-industries/zed#7543 (comment)

Don't know why it wasn't static in the first place (in the original Haskell grammar),
but I looked at what other grammars do and none export any functions other than those used by Tree-sitter.
  • Loading branch information
postsolar authored Feb 23, 2024
1 parent e5b6975 commit 08cdbb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ typedef struct {
#endif
} State;

State state_new(TSLexer *l, const bool * restrict vs, indent_vec *is) {
static State state_new(TSLexer *l, const bool * restrict vs, indent_vec *is) {
return (State) {
.lexer = l,
.symbols = vs,
Expand Down

0 comments on commit 08cdbb8

Please sign in to comment.