Open aartaka opened 5 days ago
I will accept pull requests to solve this issue. However, I will not work on this issue directly; I would like to solve it using a Sexp-based meta parser.
HOWEVER, '.b' test cases are welcome. People requesting to add parsers supporting new languages and/or to enhance parsers expect ctags developers to know the target languages. The expectation is wrong. The developers know only a tiny subset of the languages that ctags supports. Generally, the developers postpone the tasks related to unknown languages.
Preparing test cases is one of the ways to drive the developers. The test cases help the developers by reducing the time to learn the target language. See https://github.com/universal-ctags/ctags/issues/4065.
The value of test cases is immeasurable. We can add code to extract def*
from the current implementation. I will call the code a direct solution. I want to avoid the direct solution.
I want to implement a Sexp-based meta-parser that can be used as reusable routines to reimplement Lisp, EmacsLisp, Scheme, and Clojure parsers. I will call supporting def*
in a new Close parser based on the meta parser an indirect solution. The test cases can be used in both solutions. A test case is an implementation neutral.
Fair, I'll come up with test cases :+1:
Thank you. I would like you to read https://docs.ctags.io/en/latest/testing-parser.html#units-test-facility .
The name of the parser: clojure
Ctags only supports functions and namespaces in Clojure, lacking e.g. types and variables.
Find the examples of def and defonce for variables; defmacro for macros; defmulti for multimethods and defmethod for methods; deftype and defrecord for types; defprotocol and definterface for Clojure and Java interfaces respectively.
I cannot provide examples beyond these posts because most of the Clojure I do it private/proprietary :see_no_evil:
The version of ctags:
How do you get ctags binary: pacman on Arch Linux