From cb5dba7e1ad74f81294b8f48b84cab7683059afa Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Thu, 7 Dec 2023 18:47:13 +0100 Subject: QSPVER was incorrectly considered as a function and not a keyword --- lib/qparser/idents.ml | 4 ++-- lib/syntax/get_type.ml | 2 +- lib/syntax/t.ml | 2 -- lib/syntax/type_of.ml | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/qparser/idents.ml b/lib/qparser/idents.ml index 02fbac2..06bf32a 100644 --- a/lib/qparser/idents.ml +++ b/lib/qparser/idents.ml @@ -131,8 +131,8 @@ let _ = ("PL", KEYWORD T.Pl); ("*PL", KEYWORD T.Pl'); ("PLAY", KEYWORD T.Play); - ("QSPVER", FUNCTION T.Qspver); - ("$QSPVER", FUNCTION T.Qspver'); + ("$QSPVER", IDENT "$QSPVER"); + ("QSPVER", IDENT "$QSPVER"); ("RAND", FUNCTION T.Rand); ("REFINT", KEYWORD T.RefInt); ("REPLACE", FUNCTION T.Replace); diff --git a/lib/syntax/get_type.ml b/lib/syntax/get_type.ml index 2bd12bb..a9ec48d 100644 --- a/lib/syntax/get_type.ml +++ b/lib/syntax/get_type.ml @@ -83,7 +83,7 @@ let function_ : S.pos -> T.function_ -> t list -> t = | Replace -> Variable String | Replace' -> Variable String | Rgb -> Raw Integer - | Qspver | Qspver' | Rnd -> Raw Integer + | Rnd -> Raw Integer | Selact -> Variable String | Stattxt -> Variable String | Stattxt' -> Variable String diff --git a/lib/syntax/t.ml b/lib/syntax/t.ml index c50d2e2..697b18e 100644 --- a/lib/syntax/t.ml +++ b/lib/syntax/t.ml @@ -64,8 +64,6 @@ type function_ = | Min | Min' | Msecscount - | Qspver - | Qspver' | Rand | Replace | Replace' diff --git a/lib/syntax/type_of.ml b/lib/syntax/type_of.ml index d132162..b2776fc 100644 --- a/lib/syntax/type_of.ml +++ b/lib/syntax/type_of.ml @@ -268,7 +268,7 @@ module TypedExpression = struct | Replace -> (default, report) | Replace' -> (default, report) | Rgb -> (default, report) - | Qspver | Qspver' | Rnd -> + | Rnd -> (* No arg *) let report = Helper.compare_args pos [] types report in (default, report) -- cgit v1.2.3