mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 02:13:11 +00:00
fix: external pylib bugs
This commit is contained in:
parent
20935796fd
commit
fb0248fdf1
7 changed files with 41 additions and 5 deletions
|
@ -4406,6 +4406,18 @@ impl VarPattern {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn escaped(&self) -> Option<Str> {
|
||||
match self {
|
||||
Self::Ident(ident) => {
|
||||
let inspect = ident.inspect();
|
||||
Some(Str::rc(
|
||||
inspect.trim_end_matches('!').trim_start_matches('$'),
|
||||
))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
// _!(...) = ... is invalid
|
||||
pub fn is_procedural(&self) -> bool {
|
||||
match self {
|
||||
|
@ -4502,6 +4514,10 @@ impl VarSignature {
|
|||
self.pat.inspect()
|
||||
}
|
||||
|
||||
pub fn escaped(&self) -> Option<Str> {
|
||||
self.pat.escaped()
|
||||
}
|
||||
|
||||
pub const fn vis(&self) -> &VisModifierSpec {
|
||||
self.pat.vis()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue