From f126db2e1d476d5f7457594bcb318a5cb5f0c528 Mon Sep 17 00:00:00 2001 From: mryouse Date: Wed, 22 Jun 2022 00:59:28 +0000 Subject: give builtin functions proper names --- neb/structs.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'neb/structs.py') 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): -- cgit v1.2.3