aboutsummaryrefslogtreecommitdiff
path: root/structs.py
diff options
context:
space:
mode:
authormryouse2022-06-05 03:06:12 +0000
committermryouse2022-06-05 03:06:12 +0000
commit86104621edc9758155909e0b6e7b9822190815fc (patch)
tree572e8720273daa75e93da50c75808d046ceae3d8 /structs.py
parented78cd23f92b8b96dd7ffa3313be2262b0b29ff0 (diff)
refactor: better error messages
Diffstat (limited to 'structs.py')
-rw-r--r--structs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/structs.py b/structs.py
index bab9c13..0cd4a1e 100644
--- a/structs.py
+++ b/structs.py
@@ -97,8 +97,9 @@ class Type:
return self.name
class Symbol:
- def __init__(self, name):
+ def __init__(self, name, line):
self.name = name
+ self.line = line
def __str__(self):
return f"'{self.name}"
@@ -107,4 +108,4 @@ class List:
self.args = args
self.data = data
def __str__(self):
- return "(" + ",".join(f"{arg}" for arg in self.args) + ")"
+ return "(" + " ".join(f"{arg}" for arg in self.args) + ")"