From 222462c77a695c1ba28ee8fc535a43979c0cff2d Mon Sep 17 00:00:00 2001 From: Jeff Long <willcode4@gmail.com> Date: Fri, 9 Apr 2021 19:52:51 -0400 Subject: grc: match data type aliases as well as types Signed-off-by: Jeff Long <willcode4@gmail.com> --- grc/core/Constants.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'grc/core/Constants.py') diff --git a/grc/core/Constants.py b/grc/core/Constants.py index b5b7c270cf..65b4ac2ab1 100644 --- a/grc/core/Constants.py +++ b/grc/core/Constants.py @@ -115,5 +115,21 @@ ALIAS_TYPES = { 'bits': (1, GRC_COLOR_PURPLE_A100), } +ALIAS_OF = { + 'complex': 'fc32', + 'float': 'f32', + 'int': 's32', + 'short': 's16', + 'byte': 's8', + 'bits': 'bit', + + 'fc32': 'complex', + 'f32': 'float', + 's32': 'int', + 's16': 'short', + 's8': 'byte', + 'bit': 'bits', +} + TYPE_TO_SIZEOF = {key: sizeof for name, key, sizeof, color in CORE_TYPES} TYPE_TO_SIZEOF.update((key, sizeof) for key, (sizeof, _) in ALIAS_TYPES.items()) -- cgit v1.2.3