A node can be ``extra'': such nodes represent things like comments,
which can appear anywhere in the text.
-@cindex tree-sitter node that has changes
-@cindex has changes, tree-sitter node
-A node ``has changes'' if the buffer changed since the last time the
-node was retrieved, i.e., the node is outdated.
-
@cindex tree-sitter node that has error
@cindex has error, tree-sitter node
A node ``has error'' if the text it spans contains a syntax error. It
@defun treesit-node-check node property
This function checks if @var{node} has the specified @var{property}.
-@var{property} can be @code{named}, @code{missing}, @code{extra},
-@code{has-changes}, or @code{has-error}.
+@var{property} can be @code{named}, @code{missing}, @code{extra}, or
+@code{has-error}.
@end defun
@defun treesit-node-type node
ts_node_is_named treesit-node-check
ts_node_is_missing treesit-node-check
ts_node_is_extra treesit-node-check
-ts_node_has_changes treesit-node-check
+ts_node_has_changes
ts_node_has_error treesit-node-check
ts_node_parent treesit-node-parent
ts_node_child treesit-node-child
Ftreesit_node_check, Streesit_node_check, 2, 2, 0,
doc: /* Return non-nil if NODE has PROPERTY, nil otherwise.
-PROPERTY could be `named', `missing', `extra', `has-changes', or `has-error'.
+PROPERTY could be `named', `missing', `extra', or `has-error'.
Named nodes correspond to named rules in the language definition,
whereas "anonymous" nodes correspond to string literals in the
Extra nodes represent things like comments, which are not required the
language definition, but can appear anywhere.
-A node "has changes" if the buffer changed since the node is
-created. (Don't forget the "s" at the end of `has-changes'.)
-
A node "has error" if itself is a syntax error or contains any syntax
errors. */)
(Lisp_Object node, Lisp_Object property)
result = ts_node_is_extra (treesit_node);
else if (EQ (property, Qhas_error))
result = ts_node_has_error (treesit_node);
- else if (EQ (property, Qhas_changes))
- result = ts_node_has_changes (treesit_node);
else
signal_error ("Expecting `named', `missing', `extra', "
- "`has-changes' or `has-error', but got",
+ "or `has-error', but got",
property);
return result ? Qt : Qnil;
}
DEFSYM (Qnamed, "named");
DEFSYM (Qmissing, "missing");
DEFSYM (Qextra, "extra");
- DEFSYM (Qhas_changes, "has-changes");
DEFSYM (Qhas_error, "has-error");
DEFSYM (Qnot_found, "not-found");