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

Scrubbing a negative number to positive and back to negative results in a double "-" sign #10

Open
Azeirah opened this issue Jun 16, 2015 · 1 comment

Comments

@Azeirah
Copy link
Contributor

Azeirah commented Jun 16, 2015

Reproduce:
Start with number 50
Scrub to -50
Scrub back to 50, don't release mouse and scrub back to -50.

Looking at a negative number in Moonchild, you can see the minus sign doesn't have a dotted underline.. The sign of a number is not considered.

@pdubroy
Copy link
Collaborator

pdubroy commented Jun 22, 2015

The problem is that the widget looks for AST nodes of type 'Literal', and by JavaScript's grammar, -50 is a 'UnaryExpression' whose argument is the literal 50: http://esprima.org/demo/parse.html?code=-50

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

No branches or pull requests

2 participants