cheekybits / genny

Elegant generics for Go
MIT License
1.71k stars 167 forks source link

Fix #49 and #36 - use go scanner for parsing lines and identifiers #50

Closed justnoise closed 6 years ago

justnoise commented 6 years ago

I ran into some issues of genny finding identifier boundaries. It seems that others have run into these issues as well:

The parser was updated to use go's golang scanner (go/scanner) to find identifier boundaries instead of splitting on whitespace and checking for characters at the alphanumeric boundaries.

matryer commented 6 years ago

@pdrum Can you review this please? It looks good to me.

pdrum commented 6 years ago

@justnoise Thank you so much for the changes. It looks great.

I will merge this along with https://github.com/cheekybits/genny/pull/51 on Thursday or Friday to address issues tagged with this milestone. Before that I will add some tests in another PR and perform some manual checks to make sure everything works and all those issues are resolved.

I opened https://github.com/cheekybits/genny/pull/51 a while ago but it's not reviewed yet. Would you consider reviewing it if you felt like it maybe?

Also I was wondering if you could take the time to squash the two last commits, so that the last one pertinent to renaming of imports won't appear in git history.

justnoise commented 6 years ago

Good call on squashing the last commit. Thanks for the good review and pushing all this through. Due to the lack of activity in this repo, I didn't expect to see these changes merged (I made the change so I could use genny in one of my projects...) so I'm really happy with how this turned out.