Small improvements to the helper utility.

This commit is contained in:
Relintai 2023-05-29 18:55:24 +02:00
parent 85c9e13d06
commit c851d2d1b8

View File

@ -3,7 +3,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "e2b44aa4", "id": "e63822b3",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -13,7 +13,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "d67b4db8", "id": "e0a17595",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -42,7 +42,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "b64d9962", "id": "ca49ac34",
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -58,6 +58,8 @@
" 'bool': 'pandemonium_bool',\n", " 'bool': 'pandemonium_bool',\n",
" 'int': 'pandemonium_int',\n", " 'int': 'pandemonium_int',\n",
" 'real_t': 'pandemonium_real',\n", " 'real_t': 'pandemonium_real',\n",
" 'float': 'pandemonium_real',\n",
" 'double': 'pandemonium_real',\n",
" 'String': 'pandemonium_string',\n", " 'String': 'pandemonium_string',\n",
" 'Rect2': 'pandemonium_rect2',\n", " 'Rect2': 'pandemonium_rect2',\n",
" 'Rect2i': 'pandemonium_rect2i',\n", " 'Rect2i': 'pandemonium_rect2i',\n",
@ -98,6 +100,8 @@
" 'bool': True,\n", " 'bool': True,\n",
" 'int': True,\n", " 'int': True,\n",
" 'real_t': True,\n", " 'real_t': True,\n",
" 'float': True,\n",
" 'double': True,\n",
"}\n", "}\n",
"\n", "\n",
"METHOD_ARG_TYPE_NONE = 0\n", "METHOD_ARG_TYPE_NONE = 0\n",
@ -224,10 +228,10 @@
" self.is_constructor = False\n", " self.is_constructor = False\n",
" \n", " \n",
" def parse_line(self, l):\n", " def parse_line(self, l):\n",
" l = l.replace('//', '')\n", " l = l.replace('//', '').strip()\n",
" l = l.replace(';', '')\n", " l = l.replace(';', '').strip()\n",
" l = l.replace('inline', '')\n", " l = l.replace('inline', '').strip()\n",
" l = l.replace('_FORCE_INLINE_', '')\n", " l = l.replace('_FORCE_INLINE_', '').strip()\n",
" l = l.strip()\n", " l = l.strip()\n",
" \n", " \n",
" self.is_const = False\n", " self.is_const = False\n",
@ -430,7 +434,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "8af52393", "id": "275dd409",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Input" "# Input"
@ -439,7 +443,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "5ceb77b1", "id": "4248b0cc",
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -450,7 +454,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "e8906dca", "id": "5613fdfa",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Output" "# Output"
@ -459,7 +463,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "765825e3", "id": "47e7b581",
"metadata": { "metadata": {
"scrolled": false "scrolled": false
}, },
@ -470,7 +474,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "d3c2bd5c", "id": "3836e292",
"metadata": {}, "metadata": {},
"source": [ "source": [
" " " "
@ -478,7 +482,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "dd02c021", "id": "3b7827b4",
"metadata": {}, "metadata": {},
"source": [ "source": [
" " " "