From 08cdbb85eeaab317701bc797770a2c1a65e43ffe Mon Sep 17 00:00:00 2001 From: postsolar <120750161+postsolar@users.noreply.github.com> Date: Fri, 23 Feb 2024 06:50:39 +0200 Subject: [PATCH] fix: scanner: make `state_new()` static (#17) I suspect this is what causing issues for multiple projects attempting to use this grammar: - https://github.com/neurocyte/zat/issues/1 - https://github.com/zed-industries/zed/pull/7543#issuecomment-1934395267 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. --- src/scanner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scanner.c b/src/scanner.c index c616b6e..893efad 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -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,