123456789101112131415161718192021222324252627282930(* SPDX-FileCopyrightText: 2025 Christian Lindig <lindig@gmail.com>
* SPDX-License-Identifier: Unlicense
*)(* Type definition for the Abstract Syntax Tree (AST).
This defines the structure of the recognized expressions.
Expressions can evaluate to either a float (A) or a boolean (B).
*)typeexpr=|FloatLiteraloffloat|BoolLiteralofbool|StringLiteralofstring|IDofstring|Plusofexpr*expr|Minusofexpr*expr|Timesofexpr*expr|Divideofexpr*expr|Notofexpr|Andofexpr*expr|Orofexpr*expr|Equalofexpr*expr(* a == b *)|Lessofexpr*expr(* a < b *)|Greaterofexpr*expr(* a > b *)|LessEqualofexpr*expr|GreaterEqualofexpr*expr|NotEqualofexpr*expr|Insideofexpr*expr*expr(* v in [x, y] *)|Outsideofexpr*expr*expr(* v in [x, y] *)typeexpression=expr