57 lines
749 B
Go
57 lines
749 B
Go
package ast
|
|
|
|
import (
|
|
"encoding/xml"
|
|
|
|
"code.capytal.cc/loreddev/x/xhtml/ast/attributes"
|
|
)
|
|
|
|
type HTML struct {
|
|
version string
|
|
xmlns string
|
|
|
|
attributes.Global
|
|
BaseNode
|
|
}
|
|
|
|
func (n HTML) Kind() NodeKind {
|
|
return KindHTML
|
|
}
|
|
|
|
var KindHTML = NewNodeKind("html", &HTML{})
|
|
|
|
func (n HTML) Version() string {
|
|
return n.version
|
|
}
|
|
|
|
func (n *HTML) SetVersion(v string) {
|
|
n.version = v
|
|
}
|
|
|
|
func (n HTML) XMLNS() string {
|
|
return n.xmlns
|
|
}
|
|
|
|
func (n *HTML) SetXMLNS(ns string) {
|
|
n.xmlns = ns
|
|
}
|
|
|
|
type Custom struct {
|
|
tagName xml.Name
|
|
attributes []xml.Attr
|
|
|
|
attributes.Global
|
|
BaseNode
|
|
}
|
|
|
|
func (n Custom) Kind() NodeKind {
|
|
return KindUnknown
|
|
}
|
|
|
|
var KindUnknown = NewNodeKind("custom", &Custom{})
|
|
|
|
type Template struct {
|
|
attributes.Global
|
|
BaseNode
|
|
}
|