Skip to content

Update Scheme syntax for real numbers#3159

Merged
RunDevelopment merged 1 commit intoPrismJS:masterfrom
jcubic:patch-1
Oct 23, 2021
Merged

Update Scheme syntax for real numbers#3159
RunDevelopment merged 1 commit intoPrismJS:masterfrom
jcubic:patch-1

Conversation

@jcubic
Copy link
Copy Markdown
Contributor

@jcubic jcubic commented Oct 22, 2021

According to R7RS spec, you can use different mnemonics
for the scientific notation that indicated the precision of the number.

Just found about this in section 6.2.4 of R7RS spec where it says:

Implementations may provide more than one representation of floating-point numbers with differing precisions.

I was testing in Chicken, Kawa, Gambit, and Gauche implementations all of them support different precision mnemonics for real numbers.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 22, 2021

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +4 B (+0.2%).

Details
file master pull size diff % diff
components/prism-scheme.min.js 1.63 KB 1.64 KB +4 B +0.2%

Generated by 🚫 dangerJS against 0523534

@jcubic
Copy link
Copy Markdown
Contributor Author

jcubic commented Oct 22, 2021

I'm not sure why some builds failed.

@RunDevelopment
Copy link
Copy Markdown
Member

The change itself LGTM.

The build failed because you also have to commit the minified scheme file. Run npm run build to update the minified file and then commit it.

Also, could you please add a test for this? You can learn more about tests here.
The TLDR; is that you insert the code snippet you want to test into the tet file and run npm run test:languages -- --update.

According to R7RS spec, you can use different mnemonics
for the scientific notation that indicated the precision of the number.
@jcubic
Copy link
Copy Markdown
Contributor Author

jcubic commented Oct 23, 2021

Added min.js file and unit tests.

@RunDevelopment RunDevelopment merged commit 4eb81fa into PrismJS:master Oct 23, 2021
@RunDevelopment
Copy link
Copy Markdown
Member

Thank you for contributing @jcubic!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants