aboutsummaryrefslogtreecommitdiff
path: root/neb/structs.py
diff options
context:
space:
mode:
authormryouse2022-06-22 00:59:28 +0000
committermryouse2022-06-22 00:59:28 +0000
commitf126db2e1d476d5f7457594bcb318a5cb5f0c528 (patch)
treee23fc55a7d864cc47685c6199ce1775c265f1a85 /neb/structs.py
parentf2c9f51359f7f2c7a1b968bc72ca911b7bb2b2d0 (diff)
give builtin functions proper names
Diffstat (limited to 'neb/structs.py')
-rw-r--r--neb/structs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/neb/structs.py b/neb/structs.py
index cba0c03..f1cee95 100644
--- a/neb/structs.py
+++ b/neb/structs.py
@@ -128,6 +128,13 @@ class Arg:
lazy = "~" if self.lazy else ""
return f"{lazy}{opt}{self.name} {self.type_}"
+def string_args(args, many):
+ out = [f"{arg}" for arg in args]
+ if many is not None:
+ many.name = "&"
+ out.append(f"{many}")
+ return " ".join(out).strip()
+
class Environment:
def __init__(self, parent=None):