rdaum / moor

A system for building shared, programmable, online spaces. Compatible with LambdaMOO.
GNU General Public License v3.0
162 stars 8 forks source link

[rdaum] drive Pratt and this from one common precedence table. #45

Closed github-actions[bot] closed 9 months ago

github-actions[bot] commented 9 months ago

https://github.com/rdaum/moor/blob/a951a75fbd22306ec6e29d403eb9d7cd7d88b405/crates/compiler/src/unparse.rs#L38


        // directly on http://en.cppreference.com/w/cpp/language/operator_precedence
        // Should be kept in sync with the pratt parser in `parse.rs`
        // Starting from lowest to highest precedence...
        // TODO(rdaum): drive Pratt and this from one common precedence table.
        let cpp_ref_prep = match self {
            Expr::Scatter(_, _) | Expr::Assign { .. } => 14,
            Expr::Cond { .. } => 13,
github-actions[bot] commented 9 months ago

Closed in f0ad4fddb4685fd980edace998a91b5f30d99317