Anders429 / word_filter

A Word Filter for filtering text.
Apache License 2.0
1 stars 0 forks source link

Separator state type #49

Closed Anders429 closed 3 years ago

Anders429 commented 3 years ago

This PR switches from pushing the AppendedSeparator value to the stack to using a Separator state type to identify whether computation is within a separator.

This is preferable to #47, since it doesn't require any differentiation by the user between different types of separators. Plus, this passes some edge cases that #47 doesn't.

Fixes #41 and #48.

codecov-commenter commented 3 years ago

Codecov Report

Merging #49 (1a193b0) into 0.6.0 (e0a437e) will increase coverage by 0.80%. The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##            0.6.0      #49      +/-   ##
==========================================
+ Coverage   87.63%   88.44%   +0.80%     
==========================================
  Files           9        9              
  Lines         566      571       +5     
==========================================
+ Hits          496      505       +9     
+ Misses         70       66       -4     
Impacted Files Coverage Δ
src/pda.rs 84.00% <90.90%> (+2.18%) :arrow_up:
src/lib.rs 92.30% <100.00%> (+0.30%) :arrow_up:
tests/integration.rs 100.00% <100.00%> (ø)
word_filter_codegen/src/pda.rs 86.06% <100.00%> (+0.23%) :arrow_up:
word_filter_codegen/src/type.rs 100.00% <100.00%> (ø)

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 e0a437e...1a193b0. Read the comment docs.