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

Fix unary minus behaviour #188

Merged
merged 5 commits into from
Oct 11, 2023

Conversation

HarrisL2
Copy link
Contributor

@HarrisL2 HarrisL2 commented Oct 6, 2023

Breaks one test in NegativeLits.mls when using :NewParser, but doesn't produce error if changed to :NewDefs.
Not sure what that test is supposed to represent.

Behaviour could be further modified to allow for unary addition (+) and negation (!)

Copy link
Contributor

@LPTK LPTK left a comment

Choose a reason for hiding this comment

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

Thanks! This is definitely an improvement, but plz see the PR comments.

shared/src/main/scala/mlscript/NewLexer.scala Outdated Show resolved Hide resolved
shared/src/main/scala/mlscript/NewLexer.scala Outdated Show resolved Hide resolved
shared/src/test/diff/parser/NegativeLits.mls Outdated Show resolved Hide resolved
shared/src/test/diff/nu/UnaryMinus.mls Show resolved Hide resolved
shared/src/main/scala/mlscript/NewParser.scala Outdated Show resolved Hide resolved
Copy link
Contributor

@LPTK LPTK left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Plz just address the two comments, then I'll squash-merge this.

shared/src/main/scala/mlscript/NewParser.scala Outdated Show resolved Hide resolved
shared/src/main/scala/mlscript/NewParser.scala Outdated Show resolved Hide resolved
HarrisL2 and others added 2 commits October 11, 2023 01:10
Co-authored-by: Lionel Parreaux <lionel.parreaux@gmail.com>
Co-authored-by: Lionel Parreaux <lionel.parreaux@gmail.com>
@LPTK LPTK merged commit ed08423 into hkust-taco:new-definition-typing Oct 11, 2023
1 check passed
@HarrisL2 HarrisL2 deleted the unary-minus branch October 11, 2023 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants