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:
Shunsuke Shibayama 2022-09-02 01:19:43 +09:00
parent 66451ad61a
commit 0844fb2f7a
6 changed files with 510 additions and 83 deletions

View file

@ -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)
}
}