Remove generated parsers' dependency on runtime.h
This commit is contained in:
parent
b94a7bfd71
commit
e149d94ff5
24 changed files with 181 additions and 167 deletions
|
|
@ -1,9 +1,16 @@
|
|||
#ifndef RUNTIME_LENGTH_H_
|
||||
#define RUNTIME_LENGTH_H_
|
||||
|
||||
#include "tree_sitter/parser.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
size_t bytes;
|
||||
size_t chars;
|
||||
size_t rows;
|
||||
size_t columns;
|
||||
} TSLength;
|
||||
|
||||
static inline bool ts_length_is_unknown(TSLength self) {
|
||||
return self.chars > 0 && self.bytes == 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue