mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-24 13:34:52 +00:00
fix(els): signature help
This commit is contained in:
parent
1332b009b7
commit
b746cd38bd
8 changed files with 148 additions and 56 deletions
|
@ -332,6 +332,14 @@ impl Args {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn last(&self) -> Option<&Expr> {
|
||||
if self.kw_args.is_empty() {
|
||||
self.pos_args.last().map(|a| &a.expr)
|
||||
} else {
|
||||
self.kw_args.last().map(|a| &a.expr)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_left_or_key(&mut self, key: &str) -> Option<Expr> {
|
||||
if !self.pos_args.is_empty() {
|
||||
Some(self.pos_args.remove(0).expr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue