Fix build warnings

This commit is contained in:
Max Brunsfeld 2016-11-19 20:45:32 -08:00
parent 6cf4ccb840
commit 5332fd3418
4 changed files with 16 additions and 9 deletions

View file

@ -82,13 +82,17 @@ static void ts_lexer__advance(void *payload, TSStateId state, bool skip) {
void ts_lexer_init(Lexer *self) {
*self = (Lexer){
.data =
{
.advance = ts_lexer__advance, .lookahead = 0, .result_symbol = 0,
},
.data = {
.advance = ts_lexer__advance,
.lookahead = 0,
.result_symbol = 0,
},
.chunk = NULL,
.chunk_start = 0,
.logger = {},
.logger = {
.payload = NULL,
.log = NULL
},
};
ts_lexer_reset(self, length_zero());
}

View file

@ -24,8 +24,11 @@ Tree *ts_tree_make_leaf(TSSymbol sym, Length padding, Length size,
.padding = padding,
.visible = metadata.visible,
.named = metadata.named,
.first_leaf.symbol = sym,
.has_changes = false,
.first_leaf = {
.symbol = sym,
.lex_state = 0
}
};
return result;
}