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); }