Skip to content

Improve support for parsing and formatting //#6927

Merged
bcardiff merged 3 commits intocrystal-lang:masterfrom
bcardiff:fix/parse-int-div
Oct 11, 2018
Merged

Improve support for parsing and formatting //#6927
bcardiff merged 3 commits intocrystal-lang:masterfrom
bcardiff:fix/parse-int-div

Conversation

@bcardiff
Copy link
Member

Fixes #6761
Required for #6891
and implements the same logic from 5cb2886 in the formatter.

Essentially improves the support for dealing with // as a integer division operator or empty regex is some corner cases by the parser and by the formatter.

Some of the specs are not needed per-se but I added while learning a bit of the formatter. I left them to add more coverage.

@bcardiff bcardiff added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler topic:tools:formatter labels Oct 10, 2018
@bcardiff
Copy link
Member Author

I was so lost while to debugging the formatter and the parser that ... bcardiff/crystal-ast-helper 🤓

Ugly code that helps

cc: @makenowjust @asterite @ozra , in case you find it useful

@bcardiff bcardiff requested a review from asterite October 11, 2018 15:15
@bcardiff bcardiff merged commit 252a9a7 into crystal-lang:master Oct 11, 2018
@RX14 RX14 added this to the 0.27.0 milestone Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler topic:tools:formatter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants