Closed jonathanvdc closed 8 years ago
I guess I should have asked you specifically not to touch the LESv3 parser; I have already changed it a lot on my machine to support the "unified" custom literal parsing system, and your changes are not compatible. Please remove those changes - I will personally add BigInteger support to v3 after I merge this PR.
I remember seeing TestShebang fail at some point in the past, so yeah, I probably just forgot to commit something.
I've pushed some new commits that should address your concerns.
One of those commits changes a test case which used to assert that 0x1_FFFF_FFFF_0000_0000
is an erroneous token in EC#. The test now asserts that 0x1_FFFF_FFFF_0000_0000
is a valid BigInteger
literal, instead.
I had to do this because it turned out that I had unintentionally added implicit BigInteger
literals to EC# by updating the LES integer parsing logic. I don't think that implicit BigInteger
literals break backward compatibility in any way, though. So I figured that I might as well let the EC# implicit BigInteger
literals stay. Are you okay with that?
Hah! Accidental BigInts in EC#, that's funny. I guess we can let that slide. (Note to self, we need to support z
suffix too...)
This PR adds support for both explicit and implicit
BigInteger
literals to both LESv2 and LESv3. ExplicitBigInteger
literals are suffixed byz
orZ
. ImplicitBigInteger
literals are unsuffixed integer literals that do not fit in aulong
or along
, depending on the literal's sign.Note that this PR will make test
Les3LexerTests.TestShebang
fail. I suspect that this cannot be attributed to any of the changes to source files in this PR, because I can reproduce the issue on the 'master' branch.Steps to reproduce:
Les3LexerTests.TestShebang
then fails withI'm assuming that I either gave LLLPG bad command-line arguments, or that you forgot to push
Core/Loyc.Syntax/LES/Les3Lexer.out.cs
at some point. I don't know how to fix the failing test, though.Do you think this PR is acceptable as-is? If not, what should I change?