-
-
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
Record fixity of call type in flags #124
Conversation
We now record which precise call syntax was used out of the four options: * Prefix calls with parens * Prefix operator calls * Infix operator calls * Postfix operator calls This allows us to distinguish keyword arguments from assignment, fixing several bugs with = to kw conversion.
24c5840
to
0bb5ec7
Compare
src/parse_stream.jl
Outdated
is_prefix_op_call(head) && (str = str*"h") | ||
is_suffix_op_call(head) && (str = str*"j") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not limited to one-char suffixes here, right? So -pre
/-suf
or -pre
/-post
would probably be the more obvious choices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flags can be combined (eg raw and triple string), so I did limit it to one char suffixes on purpose.
Could be a good idea though to make these clearer. But if we do, let's do all the flags at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ie, in a separate PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I'll do this now after all: These particular flags aren't combined with others so this will be clearer and the lack of consistency shouldn't be a big deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
We now record which precise call syntax was used out of the four options:
This allows us to distinguish keyword arguments from assignment, fixing several bugs with = to kw conversion.
Fixes #113
Close #99