Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

[JS/TS] Add support for alternative octal integer literal syntax #49

Merged
merged 2 commits into from Oct 10, 2018

Conversation

spahnke
Copy link
Contributor

@spahnke spahnke commented Oct 5, 2018

Hi,

according to the ECMAScript spec octal integer literals can also be of the form 0o123 or 0O123. This PR adds support for that syntax and also adds some more tests for hex and binary integer literals.

Thanks!

@@ -146,7 +146,7 @@ export const language = {
[/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
[/0[xX](@hexdigits)/, 'number.hex'],
[/0(@octaldigits)/, 'number.octal'],
[/0[oO]?(@octaldigits)/, 'number.octal'],
Copy link
Member

Choose a reason for hiding this comment

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

👍

@rebornix rebornix merged commit 5428f8a into microsoft:master Oct 10, 2018
@spahnke spahnke deleted the octal branch October 10, 2018 18:09
@alexdima alexdima added this to the October 2018 milestone Nov 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants