From c61b9b685cfce6e8edba80c00659702e7afa4c99 Mon Sep 17 00:00:00 2001 From: mryouse Date: Mon, 20 Jun 2022 05:25:07 +0000 Subject: remove 'data' field from list, add Expr class --- neb/structs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'neb/structs.py') diff --git a/neb/structs.py b/neb/structs.py index 947f3f6..c8e7e8b 100644 --- a/neb/structs.py +++ b/neb/structs.py @@ -99,10 +99,16 @@ class Symbol: def __str__(self): return f"{self.name}" +class Expr: + def __init__(self, args): + self.args = args + self.type_ = TypeEnum.ANY # TODO no it's not + def __str__(self): + return "(" + " ".join(f"{arg}" for arg in self.args) + ")" + class List: - def __init__(self, args, data=False): + def __init__(self, args): self.args = args - self.data = data self.type_ = TypeEnum.LIST def __str__(self): return "(" + " ".join(f"{arg}" for arg in self.args) + ")" -- cgit v1.2.3