Add support for maps and arrays

This commit is contained in:
2024-03-07 14:06:07 -08:00
parent b4bc463326
commit 6c00968179
4 changed files with 798 additions and 312 deletions

View File

@@ -64,6 +64,24 @@ type Value struct {
Not bool
}
type Map struct {
Map map[Node]Node
Position Position
}
func (m Map) Pos() Position {
return m.Position
}
type Array struct {
Array []Node
Position Position
}
func (a Array) Pos() Position {
return a.Position
}
type Expr struct {
First Node
Operator Operator