feat/schema: additional literal types

This commit is contained in:
mae
2026-01-28 02:08:12 -06:00
parent 11fcbeb31a
commit dc87bef1c2
11 changed files with 7007 additions and 1484 deletions

View File

@@ -6,13 +6,19 @@ import (
)
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))
test := "(test)\n ; test comment" +
"(test a)\n" +
"(test a b)\n" +
"(test \"a\" \"b\")\n" +
"(+ 0b1010 -0xDEAD_BEEF)\n" +
"(. a b c d e f g)\n" +
"(test (test1 \"hi\") (test2 \"hi 2\"))\n" +
"(test (. \"awa\" `awawa` \"awawawa\" \"awawawawa\"))\n" +
"(test \n `new\nline`)\n" +
"(test (. 0x0.1Fp1 '\\t' 2i '\\u6767' '\\U0001F600' '\\x23' '\\043'))\n"
schema, err := CreateSchema(test)
if err != nil {
t.Fatal(err)
}
fmt.Println(schema)
}