From c851d2d1b8557e1c9c9304629623fc402d7f9377 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 29 May 2023 18:55:24 +0200 Subject: [PATCH] Small improvements to the helper utility. --- scripts/core_binding_gen_helper_util.ipynb | 30 ++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/scripts/core_binding_gen_helper_util.ipynb b/scripts/core_binding_gen_helper_util.ipynb index 86bd6fb..f54b427 100644 --- a/scripts/core_binding_gen_helper_util.ipynb +++ b/scripts/core_binding_gen_helper_util.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e2b44aa4", + "id": "e63822b3", "metadata": {}, "outputs": [], "source": [ @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d67b4db8", + "id": "e0a17595", "metadata": {}, "outputs": [], "source": [ @@ -42,7 +42,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b64d9962", + "id": "ca49ac34", "metadata": { "scrolled": true }, @@ -58,6 +58,8 @@ " 'bool': 'pandemonium_bool',\n", " 'int': 'pandemonium_int',\n", " 'real_t': 'pandemonium_real',\n", + " 'float': 'pandemonium_real',\n", + " 'double': 'pandemonium_real',\n", " 'String': 'pandemonium_string',\n", " 'Rect2': 'pandemonium_rect2',\n", " 'Rect2i': 'pandemonium_rect2i',\n", @@ -98,6 +100,8 @@ " 'bool': True,\n", " 'int': True,\n", " 'real_t': True,\n", + " 'float': True,\n", + " 'double': True,\n", "}\n", "\n", "METHOD_ARG_TYPE_NONE = 0\n", @@ -224,10 +228,10 @@ " self.is_constructor = False\n", " \n", " def parse_line(self, l):\n", - " l = l.replace('//', '')\n", - " l = l.replace(';', '')\n", - " l = l.replace('inline', '')\n", - " l = l.replace('_FORCE_INLINE_', '')\n", + " l = l.replace('//', '').strip()\n", + " l = l.replace(';', '').strip()\n", + " l = l.replace('inline', '').strip()\n", + " l = l.replace('_FORCE_INLINE_', '').strip()\n", " l = l.strip()\n", " \n", " self.is_const = False\n", @@ -430,7 +434,7 @@ }, { "cell_type": "markdown", - "id": "8af52393", + "id": "275dd409", "metadata": {}, "source": [ "# Input" @@ -439,7 +443,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ceb77b1", + "id": "4248b0cc", "metadata": { "scrolled": true }, @@ -450,7 +454,7 @@ }, { "cell_type": "markdown", - "id": "e8906dca", + "id": "5613fdfa", "metadata": {}, "source": [ "# Output" @@ -459,7 +463,7 @@ { "cell_type": "code", "execution_count": null, - "id": "765825e3", + "id": "47e7b581", "metadata": { "scrolled": false }, @@ -470,7 +474,7 @@ }, { "cell_type": "markdown", - "id": "d3c2bd5c", + "id": "3836e292", "metadata": {}, "source": [ " " @@ -478,7 +482,7 @@ }, { "cell_type": "markdown", - "id": "dd02c021", + "id": "3b7827b4", "metadata": {}, "source": [ " "