[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some issues with the tree-sitter branch
From: |
Eli Zaretskii |
Subject: |
Some issues with the tree-sitter branch |
Date: |
Sun, 16 Oct 2022 16:32:10 +0300 |
I noticed several minor issues with the branch while reading the code:
. Several places assign EMACS_INT values to uint32_t variables with
an explicit range check (and error signal in case of overflow).
. Several functions produce Lisp_Object results by reference, and
callers pass to them pointers to Lisp_Object variables. Our style
prefers returning a Lisp_Object value through the return value,
like this:
Lisp_Object some_var = some_func (...);
When a function produces a single value, I think the above is
preferable.
. There's a call to malloc in Ftreesit_parser_set_included_ranges
which doesn't check the return value of malloc, and doesn't signal
memory-full error when malloc fails (that function should perhaps
use SAFE_ALLOCA).
In addition, the style of treesit.c (indentation etc.) is not exactly
ours (but this can be fixed later).
Thank you for your work on this important feature.
- Some issues with the tree-sitter branch,
Eli Zaretskii <=
- Re: Some issues with the tree-sitter branch, Eli Zaretskii, 2022/10/16
- Re: Some issues with the tree-sitter branch, Eli Zaretskii, 2022/10/16
- tree-sitter: Paths used for loading of language definitions, Jostein Kjønigsen, 2022/10/16
- Re: tree-sitter: Paths used for loading of language definitions, Daniel Martín, 2022/10/16
- Re: tree-sitter: Paths used for loading of language definitions, Yuan Fu, 2022/10/17
- Re: tree-sitter: Paths used for loading of language definitions, Jostein Kjønigsen, 2022/10/17
- Re: tree-sitter: Paths used for loading of language definitions, Yuan Fu, 2022/10/17
- Re: tree-sitter: Paths used for loading of language definitions, Eli Zaretskii, 2022/10/17
- Re: tree-sitter: Paths used for loading of language definitions, Yuan Fu, 2022/10/17
- Re: tree-sitter: Paths used for loading of language definitions, Eli Zaretskii, 2022/10/17