Skip to content

Commit

Permalink
Fix C errors in current scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Jan 23, 2024
1 parent 0777333 commit 554d49c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typedef struct Scanner {
// anytime your language is set on a parser. Often, you will want to allocate
// memory on the heap and return a pointer to it. If your external scanner
// doesn’t need to maintain any state, it’s ok to return NULL.
void *tree_sitter_just_external_scanner_create() {
void *tree_sitter_just_external_scanner_create(void) {
Scanner *ptr = (Scanner *)malloc(SBYTES);
assert(ptr);
return ptr;
Expand Down Expand Up @@ -60,10 +60,10 @@ void tree_sitter_just_external_scanner_deserialize(void *payload,
}

// Continue and include the preceding character in the token
void advance(TSLexer *lexer) { return lexer->advance(lexer, false); }
void advance(TSLexer *lexer) { lexer->advance(lexer, false); }

// Continue and discard the preceding character
void skip(TSLexer *lexer) { return lexer->advance(lexer, true); }
void skip(TSLexer *lexer) { lexer->advance(lexer, true); }

// An EOF works as a dedent
bool handle_eof(TSLexer *lexer, Scanner *state, const bool *valid_symbols) {
Expand Down

0 comments on commit 554d49c

Please sign in to comment.