naomijub / edn-rs

[DEPRECATED]: Crate to parse and emit EDN
https://crates.io/crates/edn-rs
MIT License
81 stars 14 forks source link

Attempt to implement comments parsing for deserialize #93

Closed jollm closed 2 years ago

jollm commented 2 years ago

This change attempts to handle the following case:

"If a ; character is encountered outside of a string, that character and all subsequent characters to the next newline should be ignored."

as described in https://github.com/edn-format/edn#comments

naomijub commented 2 years ago

@evaporei Do you think we need a type Edn::Comment for serialization purposes?

naomijub commented 2 years ago

@jollm I noticed the circleCI hasn't executed. You need to go to your fork circle CI and enable it for this project

codecov-commenter commented 2 years ago

Codecov Report

Merging #93 (e21a68e) into master (ac3f2c5) will increase coverage by 0.86%. The diff coverage is 98.35%.

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
+ Coverage   84.47%   85.33%   +0.86%     
==========================================
  Files          11       11              
  Lines        1977     2135     +158     
==========================================
+ Hits         1670     1822     +152     
- Misses        307      313       +6     
Impacted Files Coverage Δ
src/deserialize/parse.rs 96.03% <98.35%> (+0.70%) :arrow_up:
src/serialize/mod.rs 85.03% <0.00%> (-1.03%) :arrow_down:
src/edn/mod.rs 74.60% <0.00%> (-0.14%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ac3f2c5...e21a68e. Read the comment docs.

jollm commented 2 years ago

The latest diff is smaller and I hope cleaner. It avoids checking for comments and whitespace at inner levels.

naomijub commented 2 years ago

I promise to review again tomorrow

naomijub commented 2 years ago

Dont forget to enable your circle CI for this project https://app.circleci.com/pipelines/github/jollm/edn-rs

jollm commented 2 years ago

Dont forget to enable your circle CI for this project https://app.circleci.com/pipelines/github/jollm/edn-rs

https://app.circleci.com/pipelines/github/jollm/edn-rs/1/workflows/5d73314a-58b5-45f1-9729-5664ca252586