-
Notifications
You must be signed in to change notification settings - Fork 8
Accept tuple.0.0 as a tuple indexing
#102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8f7f023 to
6b02340
Compare
6b02340 to
1b8ef5f
Compare
259a384 to
77d81ff
Compare
77d81ff to
5552886
Compare
|
I'm not sure this is the best approach. Tying the dot to the int as an indexing token is fixing this problem except it does introduce that ugly regex full of whitespace which in turn needs to be specially ignored and it'll become a problem if we add structs and want to index them with If we kept the original way and only added a special case for the Thinking out loud: Hrmm, so we can't avoid some whitespace in the special token. But still, indexing to identifiers should just work if we keep |
61bb05a to
cce93bd
Compare
|
@otrho |
cce93bd to
93b434c
Compare
93b434c to
77b624d
Compare
77b624d to
c983275
Compare
Closes #100
The idea is to handle the exact pattern
<int>.<int>separately. The lexer will treat this as a real, so we just break it apart in the parser. I had to mess around with the spans when reporting errors for large integers because the token span is for the whole token<int>.<int>and I needed the spans of the individual<int>s.