jorts/jortsc/parser/ast_nodes.py
Luna a7034db0eb finish "parsing" of hello.jt
the AST is very ugly as it is rn. had to remove the cleanups or else its
all [[None], [None], ...]

ok im startnig to give up on doing handwritten lmao help

 - add TokenType.string
 - add read_value, read_statement, fix block reading
2019-03-10 03:04:37 -03:00

45 lines
478 B
Python

from dataclasses import dataclass
@dataclass
class TypedVar:
type_: str
name: str
@dataclass
class ReturnType:
type_: str
@dataclass
class Function:
name: str
arguments: str
ret_type: ReturnType
block: list
@dataclass
class Identifier:
name: str
@dataclass
class Import:
module: str
@dataclass
class String:
value: str
@dataclass
class Number:
value: str
@dataclass
class FunctionCall:
function: str
args: list