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

): drive Pratt and this from one common precedence table. #154

Closed github-actions[bot] closed 9 months ago

github-actions[bot] commented 9 months ago

https://github.com/rdaum/moor/blob/f0ad4fddb4685fd980edace998a91b5f30d99317/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(): 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 47435a1442a1f5532c23944029e90982baa99bff