This repository has been archived on 2020-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
65b8d3af583f527072b220524b6cddf417fce4d8
The problem being encountered was, given something like this:
foo.bar()
we would be getting an AST that looks like this:
- binexpr:
lhs: foo
op: dot
rhs:
funcall:
expr: bar
params: []
which is the same as parsing like this:
foo . (bar())
Which isn't what we want - it's like saying "get variable foo, and then
call function bar(), and whatever is returned by bar() should be used to
get an attribute from foo" and so forth. Instead, we want "get the
attribute bar from foo, and then call it as a function," which parses
like this:
(foo . bar) ()
Dot expressions are now left-associative, and they also slurp function
call and index expression suffixes so that a dot expression before a
function call will be resolved before being called as a function.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Description
It certainly isn't Python!
Languages
Rust
100%