mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 12:51:10 +00:00
Update ast.rs
This commit is contained in:
parent
481761e50b
commit
190561d264
1 changed files with 3 additions and 3 deletions
|
@ -171,7 +171,7 @@ impl Locational for Args {
|
||||||
(Some(l), Some(r)) => Location::concat(l, r),
|
(Some(l), Some(r)) => Location::concat(l, r),
|
||||||
(Some(l), None) => Location::concat(l, self.pos_args.last().unwrap()),
|
(Some(l), None) => Location::concat(l, self.pos_args.last().unwrap()),
|
||||||
(None, Some(r)) => Location::concat(self.kw_args.first().unwrap(), r),
|
(None, Some(r)) => Location::concat(self.kw_args.first().unwrap(), r),
|
||||||
_ => unreachable!(),
|
_ => Location::Unknown,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1622,7 +1622,7 @@ impl Locational for ConstArgs {
|
||||||
} else if let Some(last) = self.pos_args.last() {
|
} else if let Some(last) = self.pos_args.last() {
|
||||||
Location::concat(self.pos_args.first().unwrap(), last)
|
Location::concat(self.pos_args.first().unwrap(), last)
|
||||||
} else {
|
} else {
|
||||||
unreachable!()
|
Location::Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3143,7 +3143,7 @@ impl Locational for LambdaSignature {
|
||||||
} else if let Some(return_t) = &self.return_t_spec {
|
} else if let Some(return_t) = &self.return_t_spec {
|
||||||
Location::concat(&self.params, return_t)
|
Location::concat(&self.params, return_t)
|
||||||
} else if self.params.is_empty() && self.params.parens.is_none() {
|
} else if self.params.is_empty() && self.params.parens.is_none() {
|
||||||
unreachable!()
|
Location::Unknown
|
||||||
} else {
|
} else {
|
||||||
self.params.loc()
|
self.params.loc()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue