Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Add negative number literals to MExpr #796

Open
br4sco opened this issue Oct 13, 2023 · 0 comments
Open

Task: Add negative number literals to MExpr #796

br4sco opened this issue Oct 13, 2023 · 0 comments

Comments

@br4sco
Copy link
Contributor

br4sco commented Oct 13, 2023

We have decided to add negative number literals to MExpr. I.e., you should be able to include negative integers and negative floats, e.g., -1 and -1., in MExpr programs.

To do this, we would have to make updates to at least the following files:

MExpr

stdlib/mexpr/pprint.mc
stdlib/mexpr/parser.mc

Boot

src/boot/lib/pprint.ml
src/boot/lib/parser.mly
src/boot/lib/lexer.mll

It is possible that pretty printers for other backends must also be updated to handle negative numbers.

Additionally, we want to extend pattern matching with negative numbers, but this could be a separate PR/issue.

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

No branches or pull requests

2 participants