Documentation ¶
Overview ¶
Package gem provides a GEneral Model for XSX data
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
Example ¶
pr := xsx.Compact(os.Stdout) gem := Sequence{Elems: []Expr{ &Atom{Str: "foo"}, &Sequence{Elems: []Expr{&Atom{Str: "bar"}}}, &Atom{Str: "baz"}, }} gem.SetBrace(Square) gem.Elems[0].(*Atom).SetQuoted(true) gem.Elems[1].SetMeta(true) Print(pr, &gem)
Output: ["foo"\(bar)baz]
Example (Atom) ¶
pr := xsx.Compact(os.Stdout) gem := Atom{Str: "foo"} Print(pr, &gem)
Output: foo
Example (Eseq) ¶
pr := xsx.Compact(os.Stdout) gem := Sequence{} gem.SetBrace(Square) Print(pr, &gem)
Output: []
Example (Qatom) ¶
pr := xsx.Compact(os.Stdout) gem := Atom{Str: "foo bar"} Print(pr, &gem)
Output: "foo bar"
Types ¶
type Expr ¶
func ReadCurrent ¶
func ReadCurrent(p *xsx.PullParser) (Expr, error)
Click to show internal directories.
Click to hide internal directories.