---
source: compiler-core/src/parse/tests.rs
expression: "\ncase 2, 3 {\n    x, y if x + y == 1 -> True\n}"
---
[
    Expression(
        Case {
            location: SrcSpan {
                start: 1,
                end: 45,
            },
            subjects: [
                Int {
                    location: SrcSpan {
                        start: 6,
                        end: 7,
                    },
                    value: "2",
                    int_value: 2,
                },
                Int {
                    location: SrcSpan {
                        start: 9,
                        end: 10,
                    },
                    value: "3",
                    int_value: 3,
                },
            ],
            clauses: Some(
                [
                    Clause {
                        location: SrcSpan {
                            start: 17,
                            end: 43,
                        },
                        pattern: [
                            Variable {
                                location: SrcSpan {
                                    start: 17,
                                    end: 18,
                                },
                                name: "x",
                                type_: (),
                                origin: VariableOrigin {
                                    syntax: Variable(
                                        "x",
                                    ),
                                    declaration: ClausePattern,
                                },
                            },
                            Variable {
                                location: SrcSpan {
                                    start: 20,
                                    end: 21,
                                },
                                name: "y",
                                type_: (),
                                origin: VariableOrigin {
                                    syntax: Variable(
                                        "y",
                                    ),
                                    declaration: ClausePattern,
                                },
                            },
                        ],
                        alternative_patterns: [],
                        guard: Some(
                            BinaryOperator {
                                location: SrcSpan {
                                    start: 25,
                                    end: 35,
                                },
                                operator: Eq,
                                operator_start: 31,
                                left: BinaryOperator {
                                    location: SrcSpan {
                                        start: 25,
                                        end: 30,
                                    },
                                    operator: AddInt,
                                    operator_start: 27,
                                    left: Var {
                                        location: SrcSpan {
                                            start: 25,
                                            end: 26,
                                        },
                                        type_: (),
                                        name: "x",
                                        definition_location: SrcSpan {
                                            start: 0,
                                            end: 0,
                                        },
                                        origin: VariableOrigin {
                                            syntax: Generated,
                                            declaration: Generated,
                                        },
                                    },
                                    right: Var {
                                        location: SrcSpan {
                                            start: 29,
                                            end: 30,
                                        },
                                        type_: (),
                                        name: "y",
                                        definition_location: SrcSpan {
                                            start: 0,
                                            end: 0,
                                        },
                                        origin: VariableOrigin {
                                            syntax: Generated,
                                            declaration: Generated,
                                        },
                                    },
                                },
                                right: Constant(
                                    Int {
                                        location: SrcSpan {
                                            start: 34,
                                            end: 35,
                                        },
                                        value: "1",
                                        int_value: 1,
                                    },
                                ),
                            },
                        ),
                        then: Var {
                            location: SrcSpan {
                                start: 39,
                                end: 43,
                            },
                            name: "True",
                        },
                    },
                ],
            ),
        },
    ),
]
