mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 12:51:10 +00:00
Update parse.rs
This commit is contained in:
parent
23a6f630c9
commit
f0c9f04027
1 changed files with 4 additions and 1 deletions
|
@ -1506,7 +1506,10 @@ impl Parser {
|
||||||
other => (Expr::Accessor(other), None),
|
other => (Expr::Accessor(other), None),
|
||||||
};
|
};
|
||||||
let mut call = Expr::Call(Call::new(obj, method_name, args));
|
let mut call = Expr::Call(Call::new(obj, method_name, args));
|
||||||
// e.g. f(x) g(x) == f(x)(g(x))
|
// e.g.
|
||||||
|
// f(x).y == Attr { obj: f(x) attr: .y }
|
||||||
|
// f(x) .y == Call { obj: f(x), args: [.y] } (with warning)
|
||||||
|
// f(x) g(x) == f(x)(g(x))
|
||||||
while let Some(res) = self.opt_reduce_args(in_type_args) {
|
while let Some(res) = self.opt_reduce_args(in_type_args) {
|
||||||
let args = res.map_err(|_| self.stack_dec())?;
|
let args = res.map_err(|_| self.stack_dec())?;
|
||||||
call = Expr::Call(Call::new(call, None, args));
|
call = Expr::Call(Call::new(call, None, args));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue