mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
Change Parser
's parsing algorithm
The LHS value is first parsed as the RHS value, and when `=` or `->` comes in, it is converted as the LHS value.
This commit is contained in:
parent
66451ad61a
commit
0844fb2f7a
6 changed files with 510 additions and 83 deletions
|
@ -97,7 +97,7 @@ pub struct KwArg {
|
|||
|
||||
impl NestedDisplay for KwArg {
|
||||
fn fmt_nest(&self, f: &mut std::fmt::Formatter<'_>, level: usize) -> std::fmt::Result {
|
||||
writeln!(f, "{}:", self.keyword)?;
|
||||
writeln!(f, "{} := ", self.keyword)?;
|
||||
self.expr.fmt_nest(f, level + 1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue