From 0a50d31098e83c668d34d1160a0f6c7d23b571cc Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sun, 5 May 2024 18:17:25 -0400 Subject: [PATCH] chore: remove reset function --- src/scanner.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/scanner.c b/src/scanner.c index a98d349..4ba2a3c 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1,4 +1,5 @@ -#include +#include "tree_sitter/parser.h" + #include enum TokenType { @@ -9,21 +10,13 @@ void *tree_sitter_squirrel_external_scanner_create() { return NULL; } void tree_sitter_squirrel_external_scanner_destroy(void *payload) {} -void tree_sitter_squirrel_external_scanner_reset(void *payload) {} - -unsigned tree_sitter_squirrel_external_scanner_serialize(void *payload, - char *buffer) { - return 0; -} +unsigned tree_sitter_squirrel_external_scanner_serialize(void *payload, char *buffer) { return 0; } -void tree_sitter_squirrel_external_scanner_deserialize(void *payload, - const char *buffer, - unsigned length) {} +void tree_sitter_squirrel_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) {} static void advance(TSLexer *lexer) { lexer->advance(lexer, false); } -bool tree_sitter_squirrel_external_scanner_scan(void *payload, TSLexer *lexer, - const bool *valid_symbols) { +bool tree_sitter_squirrel_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { while (iswspace(lexer->lookahead)) { lexer->advance(lexer, true); }