-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collaboration with universal-ctags #9
Comments
Sorry for not replying sooner. (Addressing me personally via atsign-edw will generally get my attention.) Strangely enough, I've never pumped a Clojure source file through the parser. (Crntl is used to implement a non-Clojure Lisp under iOS.) I don't see why you couldn't do it. I have no idea what your project entails, but I suppose you'd benefit from something that translates EDN/Clojure source to something closer to pure pair-based s-expressions. Is that the case? If so I am currently writing a Scheme dialect atop Chibi Scheme, and I've written an EDN/Clojure parser in it. That parser emits just the sort of s-expressions you might want. It doesn't support every aspect of Clojure syntax at the moment -- notably syntax-quoting, the deref sugar, and maybe a couple other obscurities. The code of which I speak is available at thunknyc/i7t. |
Hi there! First of all thanks for answering! Yes you are on the right track cause basically the goal for me would be to have some sort of AST that I can then traverse in order to trigger
Basically the info I'd need is kind of line/column + name and reader type of what it has been read. It seems like this project would fit more but the other one wrote on top of My long term goal would be to have fast static analysis for Clojure files. I was thing about using the ClojureScript analyzer as well at some point. |
One thing that the i7n parser lacks at the moment is line/col metadata about each read form. I’d like to add it (for error reporting) but I’m not sure of the Chibi parser combinators report that data.
Edwin Watkeys; 917-324-2435.
… On Dec 14, 2018, at 16:31, Andrea Richiardi ***@***.***> wrote:
Hi there!
First of all thanks for answering!
Yes you are on the right track cause basically the goal for me would be to have some sort of AST that I can then traverse in order to trigger universal-ctags's tag creation functions like:
static void makeFunctionTag (vString * const name, const char *dbp, int scope_index)
{
functionName (name, dbp);
if (vStringLength (name) > 0 && ClojureKinds[K_FUNCTION].enabled)
{
tagEntryInfo e;
initTagEntry (&e, vStringValue (name), K_FUNCTION);
e.lineNumber = getInputLineNumber ();
e.filePosition = getInputFilePosition ();
e.extensionFields.scopeIndex = scope_index;
makeTagEntry (&e);
}
}
Basically the info I'd need is kind of line/column + name and reader type of what it has been read.
It seems like this project would fit more but the other one wrote on top of chibi looked definitely something worth reading (I was actually exploring that scheme for a bit).
My long term goal would be to have fast static analysis for Clojure files. I was thing about using the ClojureScript analyzer as well at some point.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi @thunknyc,
I so so like the idea of a C reader for one purpose and something I am trying to achieve in my spare time - Clojure static analysis in Emacs.
I am using at the moment
universal-ctags
but the reader there is very limited.I used to be a C programmer and I might be able to come up with some hack but I wanted first to open a PR in order to gather some feedback around this crazy idea. Do you think your reader could be used for that purpose against Clojure code?
The text was updated successfully, but these errors were encountered: