This repository was archived by the owner on Sep 12, 2018. It is now read-only.
Parse and display EDN values for NaN, +Infinity and -Infinity. Fixes …#238
Merged
jsantell merged 1 commit intomozilla:rustfrom Feb 3, 2017
Merged
Parse and display EDN values for NaN, +Infinity and -Infinity. Fixes …#238jsantell merged 1 commit intomozilla:rustfrom
jsantell merged 1 commit intomozilla:rustfrom
Conversation
jsantell
commented
Feb 2, 2017
| Integer(v) => write!(f, "{}", v), | ||
| BigInteger(ref v) => write!(f, "{}N", v), | ||
| Float(OrderedFloat(v)) => write!(f, "{}", v), | ||
| Float(ref v) => { |
Contributor
Author
There was a problem hiding this comment.
Matching on constants have been deprecated, is there a more idiomatic way than if/elses?
Contributor
|
@jsantell Should make sure that escaped characters in strings are printed/parsed in an isomorphic manner. See https://github.com/edn-format/edn#strings Test added here: #241 Nil is indeed an EDN type: https://github.com/edn-format/edn#nil Should be printed as |
Contributor
|
Also filed #240 |
Contributor
|
Sorry you'll have to rebase this on top of c038c11 Please make sure the formatting respects the other rules in the peg file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…#232
@victorporof can you elaborate on what EDN escaping you're talking about in the TODO? And is there any other Float formatting issues you had in mind when writing that TODO?
While we're here, is
nulla special EDN type? From what I gather, this should be printed asnil(that's what our parser looks for, anyway)