]> git.eshelyaron.com Git - emacs.git/commit
Stylistic changes to tree-sitter code
authorPo Lu <luangruo@yahoo.com>
Thu, 27 Oct 2022 13:30:23 +0000 (21:30 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 3 Nov 2022 11:13:33 +0000 (19:13 +0800)
commitbd8e19e1e2ccfb76c1fccc4dff1f8774185cfea4
tree0756173e0f224e81d80529be57acf8cf8e168046
parent88d54756d46101b97b7fde97b4bc3b62f7bd6c06
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.
src/treesit.c
src/treesit.h