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

Added roughnum tokens that allow optional trailing ellipses (before e… #1199

Open
wants to merge 1 commit into
base: horizon
Choose a base branch
from

Conversation

jpolitz
Copy link
Member

@jpolitz jpolitz commented Sep 26, 2017

This PR supersedes #1071.

Differences are:

The optional ellipsis is placed before the exponent for such roughnums as are in scientific notation.

pyret-tokenizer.js adds many regexps that are recognizably bad numbers, involving illegal dots, or incorrect number of dots. Tests for these are included in parse.js and test-parse-errors.arr.

Note that bad numbers of the type 2. and ~2. are not treated as bad numbers as they're currently treated as methods called on a non-object.

…xponent if

any).
fromString() recognizes such roughnums.
Added a whole bunch of bad number tokens to catch illegal dots or
incorrect number of dots.
DefaultReprMethods.number prints roughnums with '...'.
Add roughnum method toStringDots() that prints roughnum with '...'.
Added lexing error checks for illegal numbers involving ellipses.
Added parsing-error checks for bad numbers.
@jpolitz
Copy link
Member Author

jpolitz commented Sep 26, 2017

@ds26gte I don't think it was a permission issue – I think Github just won't let a PR be created if there's another PR of the same commit already existing (I just saw a link to the cross-repo PR when I looked at the branch).

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.

None yet

2 participants