From 47a483d875e9bd0fb0575f9450790eb962e0d799 Mon Sep 17 00:00:00 2001 From: mryouse Date: Fri, 13 May 2022 22:50:15 +0000 Subject: return nil (empty list) if there's nothing else to return --- tokens.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tokens.py') diff --git a/tokens.py b/tokens.py index 1f1fe1b..6e4ba86 100644 --- a/tokens.py +++ b/tokens.py @@ -140,3 +140,10 @@ class NebList(NebAny): out += f"{item} " return f"{out}]" +class NebNil(NebList): + def __init__(self): + super().__init__([]) + + def __str__(self): + return "()" + -- cgit v1.2.3