-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Does not handle metadata that is an evaling_lit #50
Comments
This looks like it's in the same neighborhood as #46. Looking back at #35 (comment), there is this alternate fix idea: tree-sitter-clojure/grammar.js Lines 335 to 342 in 421546c
...
|
So I tried the following: meta_lit: $ =>
seq(field('marker', "^"),
repeat($._gap),
field('value', $._form)),
old_meta_lit: $ =>
seq(field('marker', "#^"),
repeat($._gap),
field('value', $._form)), With that, the command line invocation from before yielded:
...which is what I think we want. The Clojars testing results didn't change so I guess that may be a good sign. The potential fix has been pushed as a commit to the pre-0.0.12 branch. Added a test at 1435704. |
Addressed in aaf31ad. |
Came across this code today:
Specifically this bit was not so familiar:
^#=(array-type Storage$BucketGetOption) no-options
When this sort of thing is handed to clojure at the command line, one gets:
To make things a bit more apparent:
So I think that means that the
#=(...)
portion is supposed to be understood as what the grammar refers to asevaling_lit
[1].The upcoming grammar doesn't handle this properly:
Here the piece in question is being recognized as
tagged_or_ctor_lit
rather thanevaling_lit
.[1] I think use of this is "discouraged" and I don't come across it much --
project.clj
is where I'd seen it the most.In Clojure's source,
LispReader.java
has some relevant bits here and here.The text was updated successfully, but these errors were encountered: