Closed dsbw closed 7 months ago
It's not something I tried or considered. Pretty sure it was never supported.
You can have variables like x_y_z
- the parser for variables is encoded as
envref ::= letter | "_" { letter | digit | "_" }.
in this function: https://github.com/rm-hull/infix/blob/master/src/infix/grammar.clj#L66-L75
In theory it could be extended quite easily to enable dots, where the BNF expression would just be:
envref ::= letter | "_" { letter | digit | "_" | "." }.
If it's something you need, I can add look to add it, else a PR would be welcome
OK, finally able to get back to this. Made the changes, added some tests... Should I fork or... (It's been a long time since I submitted a PR to someone else's code on GH, so I'm not sure of the next steps.)
Hi, yes fork, make changes and then create a PR .. it should set the base to be this repo - I can then merge the changes and publish a new version on clojars
Done.
PR merged & 0.4.3 deployed to clojars: https://clojars.org/rm-hull/infix/versions/0.4.3
Hello,
I've got code I've been running for a while where the variables are namespaced.
{:x.y.z 4}
And formulae that are composed like:((from-string [] (merge all-fns {:x.y.z 4}) "1+2+x.y.z"))
And it does not work now. I get a
I was using 0.40 when I noticed this and just switched to 0.41. Then I tried flipping back to 0.33, and it all got the same error.
So did something change or did I just hallucinate that the dot-notation for variables are usable?