Skip to content

Implement postfix parsing#953

Open
SanderSpies wants to merge 2 commits into
reasonml:masterfrom
SanderSpies:post-fix
Open

Implement postfix parsing#953
SanderSpies wants to merge 2 commits into
reasonml:masterfrom
SanderSpies:post-fix

Conversation

@SanderSpies

@SanderSpies SanderSpies commented Jan 12, 2017

Copy link
Copy Markdown
Contributor

#637

Work in progress.

Changes:

50Cats

to

Cats 50.

Printing still needs to be done to finish this.

@yunxing yunxing left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Waiting for the test and printer change.

Comment thread src/reason_lexer.mll Outdated
| postfix_chars
{
let l = Lexing.lexeme lexbuf in
POSTFIX (remove_numbers l, int_of_string (remove_chars l))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: instead of using two functions, is it possible to just do one pass and return both number part and string part?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@chenglou

Copy link
Copy Markdown
Member

Thanks for the change! Btw #637 is pretty early. Let's see if people still want postfix...

@SanderSpies

Copy link
Copy Markdown
Contributor Author

Added printer support also and tests.

@SanderSpies

Copy link
Copy Markdown
Contributor Author

@chenglou This PR will be waiting patiently

@cullophid

Copy link
Copy Markdown

:+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment