Closed 0xmycf closed 4 months ago
Nice find! Let me get a test in place and try your suggestion.
Yeah, I think you are on to something for sure. My biggest concern is that this will break other stuff but let's see how the test turns out. It is possible that I should just not allow #
to lead lexemes.
As for @,(foo ...)
I am also kind of curious how this parses. I can't recall if @,
is a valid lexeme in snail. It only supports a single leading character for s-expressions for sure.
What do you think about #10? I think it will be tricky to make (@,(foo))
parse as ["@", "foo"]
because @,
is technically a valid lexeme right now.
Yes I can see the issue with this. I think this is fine.
The leading double char thing is a bit weird, but probably ok. It would require a bit of a rewrite here and there and probably overcomplicate things. How it works now is how I would have expected it to work!
This is not really related to this issue, but when setting up a project for testing I saw that snail is marked as broken on nixpkgs. Not sure if thats something you can do anything about.
Thank you for the fast response!
This is not really related to this issue, but when setting up a project for testing I saw that snail is marked as broken on nixpkgs. Not sure if thats something you can do anything about.
Do you mind opening up a ticket for this actually? I am unsure how easy it is to fix that.
Hello! Given this piece of code:
I'll show the third and fourth expr as examples:
I think this is because
leaves
trieslexeme
before it triessExpression
I switched this around in a local clone:
This needs a
try
though (imagine something like@,(foo ...)
.But with this change I get:
Which is what I had expected.
I am not super familiar with the grammar of LISP and its dialects, so maybe this is intended.
Thank you for creating this though, its gonna be super handy for me in the future!