Fix stack spec on gcc
This commit is contained in:
parent
deaa7e2755
commit
652fa2f8a5
3 changed files with 11 additions and 27 deletions
|
|
@ -17,15 +17,14 @@ typedef struct {
|
|||
} ts_lexer;
|
||||
|
||||
static inline ts_lexer ts_lexer_make() {
|
||||
ts_lexer result = {
|
||||
.chunk = NULL,
|
||||
.chunk_start = 0,
|
||||
.chunk_size = 0,
|
||||
.position_in_chunk = 0,
|
||||
.token_start_position = 0,
|
||||
.token_end_position = 0,
|
||||
.reached_end = 0,
|
||||
};
|
||||
ts_lexer result;
|
||||
result.chunk = NULL;
|
||||
result.chunk_start = 0;
|
||||
result.chunk_size = 0;
|
||||
result.position_in_chunk = 0;
|
||||
result.token_start_position = 0;
|
||||
result.token_end_position = 0;
|
||||
result.reached_end = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,17 +3,8 @@
|
|||
|
||||
START_TEST
|
||||
|
||||
enum {
|
||||
sym1 = 101,
|
||||
sym2 = 102,
|
||||
hidden_sym = 103,
|
||||
};
|
||||
|
||||
int hidden_symbols[] = {
|
||||
[sym1] = 0,
|
||||
[sym2] = 0,
|
||||
[hidden_sym] = 1,
|
||||
};
|
||||
enum { sym1, sym2, hidden_sym };
|
||||
int hidden_symbols[] = { 0, 0, 1 };
|
||||
|
||||
describe("stacks", [&]() {
|
||||
ts_stack stack;
|
||||
|
|
|
|||
|
|
@ -8,13 +8,7 @@ enum {
|
|||
pig = 4,
|
||||
};
|
||||
|
||||
static const char *names[] = {
|
||||
[ts_builtin_sym_error] = "error",
|
||||
[ts_builtin_sym_end] = "end",
|
||||
[cat] = "cat",
|
||||
[dog] = "dog",
|
||||
[pig] = "pig",
|
||||
};
|
||||
static const char *names[] = { "error", "end", "cat", "dog", "pig" };
|
||||
|
||||
describe("trees", []() {
|
||||
ts_tree *tree1, *tree2, *parent1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue