Skip to content

AstDefine.params is overly primitive-obsessed #82

Description

@MarcellPerger1

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]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ASTArea: Abstract Syntax Tree generation (AST)T-refactorRefactor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions