AstDefine.params is currently a list of tuples and it is definitely not obvious what the [0] and [1] elemeent of each tuple represent. We should change each tuple to be a new node class AstDefineParam
|
@dataclass |
|
class AstDefine(AstNode[MetadataT]): |
|
name = 'def' |
|
|
|
ident: AstIdent |
|
# TODO: this should be list[AstDefineParam] where AstParam is an AstNode |
|
params: list[tuple[AstIdent[MetadataT], AstIdent[MetadataT]]] # type, ident |
|
body: list[AstNode[MetadataT]] |
AstDefine.paramsis currently a list of tuples and it is definitely not obvious what the[0]and[1]elemeent of each tuple represent. We should change each tuple to be a new node classAstDefineParamprogramming_lang_2/parser/astgen/ast_nodes.py
Lines 107 to 114 in 9b35a47