aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/treesit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/treesit.c b/src/treesit.c
index 4031d80f7c9..cda6d4af2ee 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -4017,7 +4017,8 @@ PREDICATE can be a symbol representing a thing in
4017`treesit-thing-settings', or a predicate, like regexp matching node 4017`treesit-thing-settings', or a predicate, like regexp matching node
4018type, etc. See `treesit-thing-settings' for more details. 4018type, etc. See `treesit-thing-settings' for more details.
4019 4019
4020Return non-nil if NODE matches PREDICATE, nil otherwise. 4020Return non-nil if NODE matches PREDICATE, nil otherwise. If NODE is
4021nil, return nil.
4021 4022
4022Signals `treesit-invalid-predicate' if there's no definition of THING 4023Signals `treesit-invalid-predicate' if there's no definition of THING
4023in `treesit-thing-settings', or if PREDICATE is malformed. If 4024in `treesit-thing-settings', or if PREDICATE is malformed. If
@@ -4025,6 +4026,8 @@ IGNORE-MISSING is non-nil, don't signal an error for missing THING
4025definition, but still signal for malformed PREDICATE. */) 4026definition, but still signal for malformed PREDICATE. */)
4026 (Lisp_Object node, Lisp_Object predicate, Lisp_Object ignore_missing) 4027 (Lisp_Object node, Lisp_Object predicate, Lisp_Object ignore_missing)
4027{ 4028{
4029 if (NILP (node)) return Qnil;
4030
4028 CHECK_TS_NODE (node); 4031 CHECK_TS_NODE (node);
4029 4032
4030 Lisp_Object parser = XTS_NODE (node)->parser; 4033 Lisp_Object parser = XTS_NODE (node)->parser;