diff --git a/idl/idl_api.ysl2 b/idl/idl_api.ysl2 index a93ecac..1eb62ab 100644 --- a/idl/idl_api.ysl2 +++ b/idl/idl_api.ysl2 @@ -60,11 +60,13 @@ def "func:idl_type_is_of_typekind_struct" { result "func:exists(//struct[@name=$idltype])"; } -def "func:idl_type_is_of_typekind_list" { +def "func:idl_type_is_generic§" { param "idltype"; - result "false()"; + result "contains($idltype,'<') and contains($idltype,'>')" } + +// TODO: generic is actually not a typekid, this should return the generic typekind like list/map/pair def "func:idl_type_get_typekind_of_type" { param "idltype"; choose { @@ -76,8 +78,8 @@ def "func:idl_type_get_typekind_of_type" { result > enum when "func:idl_type_is_of_typekind_struct($idltype)" result > struct - when "func:idl_type_is_of_typekind_list($idltype)" - result > list + when "func:idl_type_is_generic($idltype)" + result > generic otherwise result "false()";