softdevteam / grmtools

Rust grammar tool libraries and binaries
Other
507 stars 31 forks source link

Return multiple lexbuildresult #330

Closed ratmice closed 2 years ago

ratmice commented 2 years ago

This implements the returning of multiple errors for LexBuildResult, The collection of multiple spans for DuplicateStartState, and testsuite cleanups.

There is quite a bit of duplicate copy/paste between cfgrammar/lrlex for the testsuite helpers, but I didn't want to undertake something like adding an entire helper crate for tests.

All the TODO/FIXME added get removed by subsequent patches.

@SMartinScottLogic This modifies your start state code which was recently added, to collect Spans, mostly in the last patch, but some parameters are added in the first, if you don't mind having a look.

ltratt commented 2 years ago

This looks mostly good to me, modulo some minor nitpicks (though I agree that it would be good to hear from @SMartinScottLogic).

ltratt commented 2 years ago

Works for me. @SMartinScottLogic ?

SMartinScottLogic commented 2 years ago

Looks good to me too

ltratt commented 2 years ago

Please squash (looks like a merge conflict too: sorry!).

ratmice commented 2 years ago

Squashed

ltratt commented 2 years ago

I have the nittiest of nitpicks: the commit message for https://github.com/softdevteam/grmtools/pull/330/commits/eb2fae5d9e86eacdec3b3bb944cb42f24f72a1be has a leading space on the line beginning "multiple spans" I think? If that is the case, please force push an update.

ratmice commented 2 years ago

Fixed that and pushed.

ltratt commented 2 years ago

bors r+

bors[bot] commented 2 years ago

Build succeeded: