Mentioned in bug#61893, although not the subject of that report. This
change fixes indentation for nested directives. For example, when the
directive involves elif and the like, the elif is nested in the if
directive, so simply using grand-parent and great-grand-parent for
anchor is insufficient, because the nesting can grow arbitrarily.
The test added also covers the last preproc fix.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--standalone-parent-skip-preproc): New function.
(c-ts-mode--indent-styles): New rules.
* test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts: New test.