mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 04:44:44 +00:00
Add stream.er
This commit is contained in:
parent
48f8ef3788
commit
f3a5d31ec4
4 changed files with 24 additions and 10 deletions
|
@ -1081,8 +1081,13 @@ pub struct Call {
|
|||
|
||||
impl NestedDisplay for Call {
|
||||
fn fmt_nest(&self, f: &mut std::fmt::Formatter<'_>, level: usize) -> std::fmt::Result {
|
||||
writeln!(f, "({}){}:", self.obj, fmt_option!(self.attr_name),)?;
|
||||
self.args.fmt_nest(f, level + 1)
|
||||
writeln!(f, "({}){}", self.obj, fmt_option!(self.attr_name),)?;
|
||||
if self.args.is_empty() {
|
||||
write!(f, "()")
|
||||
} else {
|
||||
writeln!(f, ":")?;
|
||||
self.args.fmt_nest(f, level + 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue