feat/schema: add ast and test
This commit is contained in:
18
schema/schema_test.go
Normal file
18
schema/schema_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestParser(t *testing.T) {
|
||||
test := "(test)" +
|
||||
"(test a)" +
|
||||
"(test a b)" +
|
||||
"(test \"a\" \"b\")" +
|
||||
"(+ 0b1010 -0xDEAD_BEEF)" +
|
||||
"(. a b c d e f g)" +
|
||||
"(test (test1 \"hi\") (test2 \"hi 2\"))" +
|
||||
"(test (. \"awa\" \"awawa\" \"awawawa\" \"awawawawa\"))"
|
||||
fmt.Println(CreateSchema(test))
|
||||
}
|
||||
Reference in New Issue
Block a user