Prevent crash due to huge number of possible paths through parse stack
This commit is contained in:
parent
ce5b3e8284
commit
df520635c6
5 changed files with 72 additions and 12 deletions
|
|
@ -313,17 +313,6 @@ static void parser__clear_cached_token(Parser *self) {
|
|||
self->cached_token = NULL;
|
||||
}
|
||||
|
||||
static inline bool ts_external_token_state_eq(const TSExternalTokenState *self,
|
||||
const TSExternalTokenState *other) {
|
||||
if (self == other) {
|
||||
return true;
|
||||
} else if (!self || !other) {
|
||||
return false;
|
||||
} else {
|
||||
return memcmp(self, other, sizeof(TSExternalTokenState)) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
static Tree *parser__get_lookahead(Parser *self, StackVersion version,
|
||||
ReusableNode *reusable_node,
|
||||
bool *is_fresh) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue