Skip to content

Conversation

@brson
Copy link
Collaborator

@brson brson commented Jul 17, 2018

My goal here was to simplify feed but I ended up doing a few other things:

  • Fix the accounting around \0 and newlines in the first commit - these were missed in the test suite, and seem to pass in the reference implementation.
  • Remove three of the line/column accounting variables from Ast. Most were only read to deal with accounting from feed being called multiple times, and even then the further results not actually used meaningfully. The final one, start_line, is only read in one location, and removing it doesn't affect the test suite to my recollection, but messing with it isn't particularly relevant here.

@brson
Copy link
Collaborator Author

brson commented Jul 17, 2018

I recognize I should upstream these test cases, though the NUL cases I think don't actually work with spec_tests.py and would need a custom test harness.

brson added 2 commits July 16, 2018 20:08
Since feed is private having these public is useless.

For the moment Parser is still public because pub functions in the private table
submodule take Parser, a curious assymetry in Rust's visibility rules.
@kivikakk
Copy link
Owner

Nice cleanup!

As for a custom test harness, this seems fine/likely to be accepted upstream!

@kivikakk kivikakk merged commit dc96b0e into kivikakk:master Jul 17, 2018
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.

2 participants