go-pkg/rsql/ast_test.go
2024-04-05 13:26:11 -06:00

21 lines
407 B
Go

package rsql
import "testing"
func TestString(t *testing.T) {
program := &Program{
Statements: []Statement {
ExpressionStatement{
Token: Token{TokEQ, "=="},
Expression: &InfixExpression{
Token: Token{TokEQ, "=="},
Left: &Identifier{Token{TokIdent,"foo"}, "foo"},
Operator: "==",
Right: &Integer{Token{TokInteger, "5"}, 5},
},
},
},
}
t.Log(program.String())
}