diff options
| author | mryouse | 2022-06-20 05:25:07 +0000 | 
|---|---|---|
| committer | mryouse | 2022-06-20 05:25:07 +0000 | 
| commit | c61b9b685cfce6e8edba80c00659702e7afa4c99 (patch) | |
| tree | fe6f3381f1b138d5cbb897bc75697ee6a0e4ad99 /neb/structs.py | |
| parent | c75ccd96ce41fa8cedd87c8a56f51cbb1d38893c (diff) | |
remove 'data' field from list, add Expr class
Diffstat (limited to 'neb/structs.py')
| -rw-r--r-- | neb/structs.py | 10 | 
1 files changed, 8 insertions, 2 deletions
| 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) + ")" | 
