mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 05:11:09 +00:00
Fix #205
This commit is contained in:
parent
217d55b476
commit
df0fba34bd
2 changed files with 28 additions and 2 deletions
|
@ -3450,6 +3450,10 @@ impl Expr {
|
|||
matches!(self, Expr::Accessor(acc) if acc.is_const())
|
||||
}
|
||||
|
||||
pub const fn is_definition(&self) -> bool {
|
||||
matches!(self, Expr::Def(_) | Expr::ClassDef(_) | Expr::Methods(_))
|
||||
}
|
||||
|
||||
pub fn need_to_be_closed(&self) -> bool {
|
||||
matches!(
|
||||
self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue