Skip to content

Ternary has precedence over BinaryOp::In #122

@spookydonut

Description

@spookydonut

(foo ? foo : 2 in L)
byond parses this as
((foo ? foo : 2) in L)
but we parse it as
(foo ? foo : (2 in L))

BinaryOp {
    op: In,
    lhs: Base {
        unary: [],
        term: Spanned {
            location: Location {
                file: FileId(
                    2,
                ),
                line: 22,
                column: 15,
            },
            elem: Int(
                2,
            ),
        },
        follow: [],
    },
    rhs: Base {
        unary: [],
        term: Spanned {
            location: Location {
                file: FileId(
                    2,
                ),
                line: 22,
                column: 20,
            },
            elem: Ident(
                "L",
            ),
        },
        follow: [],
    },
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions