santiago/grammar/associativity.rs
1// SPDX-FileCopyrightText: 2022 Kevin Amado <kamadorueda@gmail.com>
2//
3// SPDX-License-Identifier: GPL-3.0-only
4
5/// Ways in which repeated uses of rules with the same precedence nest.
6#[derive(Clone)]
7pub enum Associativity {
8 /// Specifies left associativity: `(x op y) op z`.
9 Left,
10 /// Specifies right associativity: `x op (y op z)`.
11 Right,
12 /// Specifies that `x op y op z` is considered a syntax error.
13 None,
14}