From e3a1d707235bff3358c840c75b3c290a002ff049 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 12 Mar 2026 20:43:14 -0500 Subject: [PATCH] xo-procedure2: + type_ member [WIP] --- include/xo/type/Metatype.hpp | 4 ++++ src/type/Metatype.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/include/xo/type/Metatype.hpp b/include/xo/type/Metatype.hpp index 6fc193a..30952df 100644 --- a/include/xo/type/Metatype.hpp +++ b/include/xo/type/Metatype.hpp @@ -40,6 +40,9 @@ namespace xo { /* struct */ t_struct, + /* any numeric type: i16|i32|i64|f32|f64 */ + t_numeric, + /* any type at all */ t_any, }; @@ -64,6 +67,7 @@ namespace xo { static Metatype t_function() { return Metatype(code::t_function); } static Metatype t_struct() { return Metatype(code::t_struct); } + static Metatype t_numeric() { return Metatype(code::t_numeric); } static Metatype t_any() { return Metatype(code::t_any); } /** description string for this type category **/ diff --git a/src/type/Metatype.cpp b/src/type/Metatype.cpp index ca61d9c..9e50f11 100644 --- a/src/type/Metatype.cpp +++ b/src/type/Metatype.cpp @@ -29,6 +29,7 @@ namespace xo { case code::t_function: return "function"; case code::t_struct: return "struct"; + case code::t_numeric: return "numeric"; case code::t_any: return "any"; } } @@ -68,6 +69,8 @@ namespace xo { case code::t_struct: return false; + case code::t_numeric: + return true; case code::t_any: return true; }