You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bonzai/old/mark/mark_test.go

29 lines
473 B
Go

package mark_test
import (
"github.com/rwxrob/bonzai/mark"
"github.com/rwxrob/scan"
)
func ExamplePlain() {
s := scan.New("some thing here")
//s.TraceX()
s.X(mark.Plain)
s.Print()
s.Tree.Root.Print()
// Output:
// <EOD>
// {"T":1,"N":[{"T":10,"V":"some thing here"}]}
}
func ExampleBracketed() {
s := scan.New("<thing>")
s.TraceX()
s.X(mark.Bracketed)
s.Print()
s.Tree.Root.Print()
// Output:
// <EOD>
// {"T":1,"N":[{"T":10,"V":"some thing here"}]}
}