diff options
| author | Po Lu | 2022-10-27 21:30:23 +0800 |
|---|---|---|
| committer | Po Lu | 2022-11-03 19:13:33 +0800 |
| commit | bd8e19e1e2ccfb76c1fccc4dff1f8774185cfea4 (patch) | |
| tree | 0756173e0f224e81d80529be57acf8cf8e168046 /src/treesit.h | |
| parent | 88d54756d46101b97b7fde97b4bc3b62f7bd6c06 (diff) | |
| download | emacs-bd8e19e1e2ccfb76c1fccc4dff1f8774185cfea4.tar.gz emacs-bd8e19e1e2ccfb76c1fccc4dff1f8774185cfea4.zip | |
Stylistic changes to tree-sitter code
* src/treesit.c (treesit_find_override_name)
(treesit_load_language_push_for_each_suffix, treesit_load_language)
(Ftreesit_langauge_available_p, treesit_record_change)
(make_treesit_parser, make_treesit_node, make_treesit_query)
(Ftreesit_parser_create, Ftreesit_parser_delete, Ftreesit_parser_list)
(treesit_check_range_argument, Ftreesit_parser_included_ranges)
(Ftreesit_node_start, Ftreesit_node_end, Ftreesit_node_check)
(Ftreesit_node_child_by_field_name, Ftreesit_pattern_expand)
(Ftreesit_query_expand, treesit_predicates_for_pattern)
(treesit_predicate_capture_name_to_text, treesit_predicate_equal)
(treesit_predicate_match, treesit_eval_predicates)
(Ftreesit_query_capture, treesit_search_dfs, treesit_build_sparse_tree)
(syms_of_treesit): Use FOR_EACH_TAIL (or FOR_EACH_TAIL_SAFE where not
obviously safe), and check list heads and tails correctly; fix coding
style of various constructs, especially:
variable =
mumble (frob (bar), (foo () + bar ()) + (baz () + quux ()))
which should actually be
variable
= mumble (frob (bar), (foo () + bar ()) + (baz () + quux ()))
and
foo =
mumble (frob (bar), 0)
+ (foo () + bar ())
+ (baz () + quux ())
which should actually be
foo = (mumble (frob (bar), 0)
+ (foo () + bar ())
+ (baz () + quux ()))
* src/treesit.h: Make declaration coding style consistent.
Diffstat (limited to 'src/treesit.h')
| -rw-r--r-- | src/treesit.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/treesit.h b/src/treesit.h index bb8ca20e196..7e1425fc9e1 100644 --- a/src/treesit.h +++ b/src/treesit.h | |||
| @@ -169,16 +169,10 @@ CHECK_TS_COMPILED_QUERY (Lisp_Object query) | |||
| 169 | Qtreesit_compiled_query_p, query); | 169 | Qtreesit_compiled_query_p, query); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | void | 172 | extern void treesit_record_change (ptrdiff_t, ptrdiff_t, ptrdiff_t); |
| 173 | treesit_record_change (ptrdiff_t start_byte, ptrdiff_t old_end_byte, | 173 | extern Lisp_Object make_treesit_parser (Lisp_Object, TSParser *, TSTree *, |
| 174 | ptrdiff_t new_end_byte); | 174 | Lisp_Object); |
| 175 | 175 | extern Lisp_Object make_treesit_node (Lisp_Object, TSNode); | |
| 176 | Lisp_Object | ||
| 177 | make_treesit_parser (Lisp_Object buffer, TSParser *parser, | ||
| 178 | TSTree *tree, Lisp_Object language_symbol); | ||
| 179 | |||
| 180 | Lisp_Object | ||
| 181 | make_treesit_node (Lisp_Object parser, TSNode node); | ||
| 182 | 176 | ||
| 183 | bool treesit_node_uptodate_p (Lisp_Object obj); | 177 | bool treesit_node_uptodate_p (Lisp_Object obj); |
| 184 | 178 | ||