Versions in this module Expand all Collapse all v0 v0.3.0 Jan 13, 2026 v0.2.0 Jan 13, 2026 v0.1.0 Jan 13, 2026 Changes in this version + func Equal(a, b Node) bool + func Print(node Node) string + func Walk(node Node, visitor Visitor) bool + type ArrayLiteral struct + Elements []Expression + func (a *ArrayLiteral) Pos() Position + func (a *ArrayLiteral) String() string + func (a *ArrayLiteral) Type() NodeType + type Assignment struct + Name string + Value Expression + func (a *Assignment) Pos() Position + func (a *Assignment) String() string + func (a *Assignment) Type() NodeType + type BinaryExpr struct + Left Expression + Operator string + Right Expression + func (b *BinaryExpr) Pos() Position + func (b *BinaryExpr) String() string + func (b *BinaryExpr) Type() NodeType + type Block struct + Statements []Statement + func (b *Block) Pos() Position + func (b *Block) String() string + func (b *Block) Type() NodeType + type BoolLiteral struct + Value bool + func (b *BoolLiteral) Pos() Position + func (b *BoolLiteral) String() string + func (b *BoolLiteral) Type() NodeType + type CollectionDecl struct + Description string + Fields []*MongoFieldDecl + Indexes []*MongoIndexDecl + Name string + func (c *CollectionDecl) Pos() Position + func (c *CollectionDecl) String() string + func (c *CollectionDecl) Type() NodeType + type ConfigDecl struct + DatabaseType DatabaseType + MongoDBName string + MongoDBURI string + Properties map[string]Expression + func (c *ConfigDecl) Pos() Position + func (c *ConfigDecl) String() string + func (c *ConfigDecl) Type() NodeType + type DatabaseBlock struct + DBType DatabaseType + Name string + Statements []Statement + func (d *DatabaseBlock) Pos() Position + func (d *DatabaseBlock) String() string + func (d *DatabaseBlock) Type() NodeType + type DatabaseType string + const DatabaseTypeMongoDB + const DatabaseTypePostgres + type EmbeddedDocDecl struct + Fields []*MongoFieldDecl + func (e *EmbeddedDocDecl) Pos() Position + func (e *EmbeddedDocDecl) String() string + func (e *EmbeddedDocDecl) Type() NodeType + type ExecBlock struct + Command string + func (e *ExecBlock) Pos() Position + func (e *ExecBlock) String() string + func (e *ExecBlock) Type() NodeType + type Expression interface + type FieldDecl struct + FieldType *TypeRef + Modifiers []*Modifier + Name string + func (f *FieldDecl) Pos() Position + func (f *FieldDecl) String() string + func (f *FieldDecl) Type() NodeType + type ForLoop struct + Body *Block + Iterable Expression + Variable string + func (f *ForLoop) Pos() Position + func (f *ForLoop) String() string + func (f *ForLoop) Type() NodeType + type FunctionCall struct + Args []Expression + Name string + func (f *FunctionCall) Pos() Position + func (f *FunctionCall) String() string + func (f *FunctionCall) Type() NodeType + type FunctionDecl struct + Body *Block + Name string + Params []Parameter + func (f *FunctionDecl) Pos() Position + func (f *FunctionDecl) String() string + func (f *FunctionDecl) Type() NodeType + type Identifier struct + Name string + func (i *Identifier) Pos() Position + func (i *Identifier) String() string + func (i *Identifier) Type() NodeType + type IfStmt struct + Condition Expression + Else *Block + Then *Block + func (i *IfStmt) Pos() Position + func (i *IfStmt) String() string + func (i *IfStmt) Type() NodeType + type IndexDecl struct + Fields []string + Unique bool + func (i *IndexDecl) Pos() Position + func (i *IndexDecl) String() string + func (i *IndexDecl) Type() NodeType + type ModelDecl struct + Description string + Fields []*FieldDecl + Indexes []*IndexDecl + Name string + func (m *ModelDecl) Pos() Position + func (m *ModelDecl) String() string + func (m *ModelDecl) Type() NodeType + type Modifier struct + Name string + Value Expression + func (m *Modifier) Pos() Position + func (m *Modifier) String() string + func (m *Modifier) Type() NodeType + type MongoFieldDecl struct + FieldType *MongoTypeRef + Modifiers []*Modifier + Name string + func (f *MongoFieldDecl) Pos() Position + func (f *MongoFieldDecl) String() string + func (f *MongoFieldDecl) Type() NodeType + type MongoIndexDecl struct + Fields []string + IndexKind string + Unique bool + func (i *MongoIndexDecl) Pos() Position + func (i *MongoIndexDecl) String() string + func (i *MongoIndexDecl) Type() NodeType + type MongoTypeRef struct + EmbeddedDoc *EmbeddedDocDecl + Name string + Params []string + func (t *MongoTypeRef) Pos() Position + func (t *MongoTypeRef) String() string + func (t *MongoTypeRef) Type() NodeType + type Node interface + Pos func() Position + String func() string + Type func() NodeType + func Clone(node Node) Node + type NodeType int + const NodeArrayLiteral + const NodeAssignment + const NodeBinaryExpr + const NodeBlock + const NodeBoolLiteral + const NodeCollectionDecl + const NodeConfigDecl + const NodeDatabaseBlock + const NodeEmbeddedDocDecl + const NodeExecBlock + const NodeFieldDecl + const NodeForLoop + const NodeFunctionCall + const NodeFunctionDecl + const NodeIdentifier + const NodeIfStmt + const NodeIndexDecl + const NodeModelDecl + const NodeModifier + const NodeMongoFieldDecl + const NodeMongoIndexDecl + const NodeMongoTypeRef + const NodeNumberLiteral + const NodeProgram + const NodeReturnStmt + const NodeStringLiteral + const NodeTypeRef + const NodeUnaryExpr + const NodeVarDecl + func (nt NodeType) String() string + type NumberLiteral struct + Value float64 + func (n *NumberLiteral) Pos() Position + func (n *NumberLiteral) String() string + func (n *NumberLiteral) Type() NodeType + type Parameter struct + Default Expression + Name string + Type string + type Position struct + Column int + Filename string + Line int + Offset int + func (p Position) IsValid() bool + func (p Position) String() string + type Program struct + Statements []Statement + func (p *Program) Pos() Position + func (p *Program) String() string + func (p *Program) Type() NodeType + type ReturnStmt struct + Value Expression + func (r *ReturnStmt) Pos() Position + func (r *ReturnStmt) String() string + func (r *ReturnStmt) Type() NodeType + type Statement interface + type StringLiteral struct + Value string + func (s *StringLiteral) Pos() Position + func (s *StringLiteral) String() string + func (s *StringLiteral) Type() NodeType + type TypeRef struct + Name string + Params []*TypeRef + func (t *TypeRef) Pos() Position + func (t *TypeRef) String() string + func (t *TypeRef) Type() NodeType + type UnaryExpr struct + Operand Expression + Operator string + func (u *UnaryExpr) Pos() Position + func (u *UnaryExpr) String() string + func (u *UnaryExpr) Type() NodeType + type VarDecl struct + Name string + Value Expression + func (v *VarDecl) Pos() Position + func (v *VarDecl) String() string + func (v *VarDecl) Type() NodeType + type Visitor func(node Node) bool