Add source info to TSTree

This commit is contained in:
joshvera 2015-11-12 15:32:53 -05:00
parent bf666351e9
commit 8058500c5b
7 changed files with 49 additions and 16 deletions

View file

@ -5,7 +5,10 @@
#include "runtime/document.h"
TSNode ts_node_make(const TSTree *tree, TSLength offset) {
return (TSNode){.data = tree, .offset = offset };
TSSourceInfo start = tree != NULL ? tree->start_source_info : ts_source_info_zero();
TSSourceInfo end = tree != NULL ? tree->end_source_info : ts_source_info_zero();
return (TSNode){.data = tree, .offset = offset, .start = start, .end = end };
}
/*