/** * Operator Precedence for MEL Parser * Based on MEL SPEC v0.3.1 Section 4.9 */ import type { TokenKind } from "../lexer/tokens.js"; import type { BinaryOperator } from "./ast.js"; /** * Precedence levels (higher = binds tighter) */ export declare enum Precedence { NONE = 0, TERNARY = 1,// ? : NULLISH = 2,// ?? OR = 3,// || AND = 4,// && EQUALITY = 5,// == != COMPARISON = 6,// < <= > >= ADDITIVE = 7,// + - MULTIPLICATIVE = 8,// * / % UNARY = 9,// ! - CALL = 10,// () ACCESS = 11 } /** * Get the precedence of a binary operator token */ export declare function getBinaryPrecedence(kind: TokenKind): Precedence; /** * Map token kind to binary operator */ export declare function tokenToBinaryOp(kind: TokenKind): BinaryOperator | null; /** * Check if a token is a binary operator */ export declare function isBinaryOp(kind: TokenKind): boolean; /** * Check if a token is a unary operator */ export declare function isUnaryOp(kind: TokenKind): boolean; /** * Check if operators are right-associative */ export declare function isRightAssociative(kind: TokenKind): boolean;