-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Rework handling of .
tokenization and dotted operator calls
#90
Comments
.
tokenization and operator calls.
tokenization and dotted operator calls
I chatted to @JeffBezanson about this. We concluded that the sensible parsing for these is to have a separate
That is, just do the same thing as Alternatively, we could use the existing |
A few points after looking into this further
Also, syntactic operators like |
More difficulties which occur while looking into this: Comparison chainsComparison chains are a bit annoying to deal with. Currently we have Prefix callsThe best parsing of things like |
I chatted to @JeffBezanson about this. Jeff commented that generally, parsing standalone dot-prefixed operators such as For comparison chains and prefix calls, this means we should adopt the following parsings:
I guess in this we need to think about the precedence of prefix- |
The handling of
.
in the tokenizer / parser is pretty wonky / inconsistent because the tokenization of.
is context-dependent.bump_split()
, in particular is quite ugly and shouldn't exist:...
is tokenized intoK"..."
which is usually correct. But incorrect forimport
/using
statements as inimport ...A ==> (import (. . . . A))
, necessitating the splitting of tokens withbump_split
- this is ugly!.+ ==> (. +)
In addition,
Expr
is quite inconsistent about dotted infix calls vs dotted prefix calls. We should really fix this? Then we can remove the.
from the operator names and treat it as separate syntax as it should be! (See also #88)The text was updated successfully, but these errors were encountered: