-
Notifications
You must be signed in to change notification settings - Fork 238
Conversation
@50Wliu can you maybe have another look whenever it fits? 🙏 |
I don't want to be the bump guy but I just published a module today that uses bigints extensively and it shows up real ugly (angry red example). It would be great if this got merged. Thanks in advance! |
Once we know which version of ECMAScript this proposed feature will land in, we'll take a closer look at it. Thanks for the submission! |
@lee-dohm It's at stage 3 in TC39 and it's shipping in at least one browser (Chrome, flag-gated in Firefox) and Node.js. That's good enough, isn't it? It's out there in the real world, it's not a hypothetical. (It also seems to have been implemented in Chakracore but I don't know if it's actually been shipped in IE. I'm guessing 'no' what with the transition to a different engine.) |
We're aware. We discussed it as a team and decided that we felt that knowing what version of ECMAScript it would appear in would be our bar for inclusion. |
Hej there 👋 TC39 June meeting just happened and BigInt advanced to stage 4 (see the checkmark next to the agenda item) and thus will be included in the next formal spec release (ECMAScript 2020). The PR towards ecma262 describing BigInt can be found here: tc39/ecma262#1515 I understand you might want to wait until this PR has landed (one never knows what might happen), just wanted to let you know 🙂 |
Hi @zcei, thank you for your contribution 🙇♂️. However, I am going to close this PR, as it seems that this PR on tree-sitter adds support for BigInt (tree-sitter/tree-sitter-javascript#93). |
As long as GitHub doesn't (fully?) use tree-sitter, I'd still love to see the changes landing. At least e.g. the example from Ben above still shows up red on GitHub - this visual flaw was my main intention for the contribution. |
Thanks @zcei for the context, this issue clearly exist on Github, while I was looking into Atom. Thanks @michaelficarra for the references. |
Description of the Change
TC39 added
BigInt
(currently at stage 3) and it's already available in e.g. Node.The grammer currently doesn't support it and yields an
invalid.illegal.identifier.js
.You can see this for example in the
README
oftc39/proposal-bigint
Alternate Designs
The octal regex could be expanded to not allow the
n
for the legacy octal definition. As this would have complicated things, I left it out. Let me know whether you think it should be added.Benefits
Proper GitHub syntax highlighting with BigInts.
Possible Drawbacks
Not really applicable as this willt part of the
Applicable Issues
n/a
Other
tree-sitter/tree-sitter-javascript#93