Don't automatically hide singleton nodes

This commit is contained in:
Max Brunsfeld 2015-09-02 16:36:29 -07:00
parent acf9280eda
commit 53926c467e
21 changed files with 4284 additions and 4221 deletions

View file

@ -11,9 +11,8 @@ extern "C" {
typedef enum {
TSTreeOptionsHidden = 1 << 0,
TSTreeOptionsExtra = 1 << 1,
TSTreeOptionsSingleton = 1 << 2,
TSTreeOptionsFragileLeft = 1 << 3,
TSTreeOptionsFragileRight = 1 << 4,
TSTreeOptionsFragileLeft = 1 << 2,
TSTreeOptionsFragileRight = 1 << 3,
} TSTreeOptions;
struct TSTree {
@ -47,14 +46,6 @@ static inline bool ts_tree_is_visible(const TSTree *tree) {
return !(tree->options & TSTreeOptionsHidden);
}
static inline bool ts_tree_is_singleton(const TSTree *tree) {
return !!(tree->options & TSTreeOptionsSingleton);
}
static inline void ts_tree_unset_singleton(TSTree *tree) {
tree->options = (TSTreeOptions)(tree->options & ~TSTreeOptionsSingleton);
}
static inline void ts_tree_set_options(TSTree *tree, TSTreeOptions options) {
tree->options = (TSTreeOptions)(tree->options | options);
}