gilch / hissp

It's Python with a Lissp.
https://gitter.im/hissp-lang/community
Apache License 2.0
364 stars 9 forks source link

Parsing quirks #228

Closed gilch closed 1 year ago

gilch commented 1 year ago

Resolves #149

No fix for ., .., or ..... The EDN Hissps currently need the single . reserved, and traditional Lisp editors might consider that part of a dotted list, so it probably shouldn't be allowed as a symbol in Lissp without an escape. ....__class__ is valid (<class 'ellipsis'>), so allowing .... would be weird. .. is similarly ambiguous. Is it a method .QzFULLxSTOP_? A module handle QzFULLxSTOP_.? Escapes (\) should be required to disambiguate.

No change to handling of ## (still a symbol, not a tag). I don't think I want to allow unescaped # in tags. Also, tags could apply to hash strings.

The other cases identified have been dealt with. This unfortunately complicates the code more than I would like, but seems worth it to deal with these edge cases.

gilch commented 1 year ago

Slight loss of coverage again. Missing a test case for a tag starting with a dot, although I did test this manually. If I ever bundle one, this will get covered. .X# etc., might happen.

There's probably a lot more that's not covered in the bundled macros, and I haven't attempted mutation testing yet, so I doubt I was 100% covered before. This is insignificant by comparison. #46 has been in my issues for a while, but I'm not planning to resolve it before the next release.