Skip to content

Commit

Permalink
chore: remove reset function
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed May 5, 2024
1 parent 6b7eb09 commit b117088
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/scanner.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <tree_sitter/parser.h>
#include "tree_sitter/parser.h"
#include <wctype.h>

// Copied and adjusted from
Expand All @@ -7,26 +7,17 @@

enum TokenType {
MULTILINE_COMMENT,
/* PREPROC_BLOCK, */
};

void *tree_sitter_tablegen_external_scanner_create() { return NULL; }

void tree_sitter_tablegen_external_scanner_destroy(void *payload) {}

void tree_sitter_tablegen_external_scanner_reset(void *payload) {}
unsigned tree_sitter_tablegen_external_scanner_serialize(void *payload, char *buffer) { return 0; }

unsigned tree_sitter_tablegen_external_scanner_serialize(void *payload,
char *buffer) {
return 0;
}

void tree_sitter_tablegen_external_scanner_deserialize(void *payload,
const char *buffer,
unsigned length) {}
void tree_sitter_tablegen_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) {}

bool tree_sitter_tablegen_external_scanner_scan(void *payload, TSLexer *lexer,
const bool *valid_symbols) {
bool tree_sitter_tablegen_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) {
if (valid_symbols[MULTILINE_COMMENT]) {
while (iswspace(lexer->lookahead)) {
lexer->advance(lexer, true);
Expand Down

0 comments on commit b117088

Please sign in to comment.