Skip to content
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

Fix issues with parsing and emitting EDN characters #6

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

skyrod-vactai
Copy link
Contributor

Fixes #4, #5. All the tests pass (including a few extra asserts I added), so hopefully it's not breaking anything.

The issue is the parser was assuming that what follows the backslash
is an atom (I presume like a symbol) but characters like parens should
be allowed here when they're not in atoms. Added some customized logic
for reading chars, not particularly optimized but I don't think it's a
big bottleneck.

Added some basic tests.
When emitting regular printable characters, the backslash escape
character was being left out.
@bowbahdoe
Copy link
Owner

@skyrod-vactai Hi - can you clarify what issues this is solving?

@bowbahdoe
Copy link
Owner

bowbahdoe commented Oct 2, 2023

nevermind - i see the linked issues. Can you fix the failing lints?

@skyrod-vactai
Copy link
Contributor Author

Thanks for looking at this @bowbahdoe ! I fixed the 2 lint errors that I caused. The other ones appear to be in the existing code.

The coverage error, I am not sure what that's about, it doesn't appear to be caused by my PR either:

  Installing /home/runner/.cargo/bin/cargo-tarpaulin
   Installed package `cargo-tarpaulin v0.27.0` (executable `cargo-tarpaulin`)
error: invalid value 'Xml' for '--out [<FMT>...]'
  [possible values: json, stdout, xml, html, lcov]

  tip: a similar value exists: 'xml'

@bowbahdoe bowbahdoe merged commit e2897ed into bowbahdoe:main Oct 3, 2023
4 checks passed
@bowbahdoe
Copy link
Owner

@skyrod-vactai I published a new version. 3.3.0 which includes this change

@skyrod-vactai
Copy link
Contributor Author

Thanks! Will upgrade and try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chars are not printed with a leading backslash
2 participants