Theodor Thornhill writes: > Eli Zaretskii writes: > >>> Cc: "61142@debbugs.gnu.org" <61142@debbugs.gnu.org> >>> Date: Sun, 05 Feb 2023 20:19:19 +0100 >>> From: Theodor Thornhill via "Bug reports for GNU Emacs, >>> the Swiss army knife of text editors" >>> >>> +(defvar c-ts-common-nestable-if-statement-p t >>> + "Does the current parser nest if-else statements? >>> + >>> +T if the current tree-sitter grammar nests the else if >>> +statements, NIL otherwise.") >> >> A nit: we use t and nil, lowercase, to refer to these two symbols. >> >> Thanks. > > Thanks! > > Theo I added some small tweaks, and will add the following as a test later: ``` public class Java { public Java( String foo) { this.foo = foo; } void foo( String foo) { for (var f : rs) return new String[]{ "foo", "bar" }; if (a == 0 && b == 1 && foo) { return 0; } else if (a == 1) { return 1; } else if (true) return 5; else { if (a == 0 && b == 1 && foo) while (true) for ( ;;) if (true) return 5; else if (false) { return 6; } else if (true && false) return 6; } } } ``` Even though its some pretty wild code, its indented correctly after this patch. I'll create something similar for C as well. Theo