package tezt
Source file TSL_AST.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37(*****************************************************************************) (* *) (* SPDX-License-Identifier: MIT *) (* Copyright (c) 2023 Nomadic Labs <contact@nomadic-labs.com> *) (* *) (*****************************************************************************) (** Abstract Syntax Tree of the Test Selection Language. *) open Base (** Test properties that can be queried using string operators. *) type string_var = File | Title (** Test properties that can be queried using integer comparison operators. *) type int_var = Memory (** Test properties that can be queried using float comparison operators. *) type float_var = Duration (** Comparison operators for strings. *) type string_operator = Is of string | Matches of rex (** Comparison operators for numbers. *) type numeric_operator = EQ | NE | GT | GE | LT | LE (** AST of TSL. *) type t = | True | False | String_predicate of string_var * string_operator | Int_predicate of int_var * numeric_operator * int | Float_predicate of float_var * numeric_operator * float | Has_tag of string | Not of t | And of t * t | Or of t * t