Get tests passing w/ new alias API

This commit is contained in:
Max Brunsfeld 2017-08-01 13:28:18 -07:00
parent cb5fe80348
commit 09f4796f6b
18 changed files with 99 additions and 94 deletions

View file

@ -33,10 +33,10 @@ static inline uint32_t ts_node__offset_row(TSNode self) {
static inline bool ts_node__is_relevant(TSNode self, bool include_anonymous) {
const Tree *tree = ts_node__tree(self);
if (tree->context.alias_symbol > 0) {
return true;
if (include_anonymous) {
return tree->context.alias_symbol || tree->visible;
} else {
return include_anonymous ? tree->visible : tree->visible && tree->named;
return tree->context.alias_is_named || (tree->visible && tree->named);
}
}