Add test for retrieving last external token state in a Tree

This commit is contained in:
Max Brunsfeld 2017-01-04 21:23:04 -08:00
parent d57043b665
commit 12cd2132ff
2 changed files with 37 additions and 0 deletions

View file

@ -386,6 +386,8 @@ const TSExternalTokenState *ts_tree_last_external_token_state(const Tree *tree)
if (child->has_external_token_state) {
tree = child;
break;
} else if (child->has_external_tokens) {
return NULL;
}
}
}