aboutsummaryrefslogtreecommitdiff
path: root/parser
diff options
context:
space:
mode:
Diffstat (limited to 'parser')
-rw-r--r--parser/parser.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/parser/parser.go b/parser/parser.go
index 1101e65..946cc97 100644
--- a/parser/parser.go
+++ b/parser/parser.go
@@ -16,9 +16,10 @@ const (
Normal
Tagless
Text
- XmlDocType
)
+var Xml = false
+
type Attr struct {
Key string
Value string
@@ -62,10 +63,11 @@ func (reader *reader) parseDocType() (AstNode, error, bool) {
}
switch r {
+ case '?':
+ Xml = true
+ fallthrough
case '!':
doctype.Type = DocType
- case '?':
- doctype.Type = XmlDocType
default:
return AstNode{}, reader.unreadRune(), false
}
@@ -262,9 +264,7 @@ loop:
switch r {
case '{':
break loop
- case '.':
- fallthrough
- case '#':
+ case '.', '#':
sym := r
// Skip ‘sym’