aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/xml/tokenizer.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/encoding/xml/tokenizer.odin')
-rw-r--r--core/encoding/xml/tokenizer.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/encoding/xml/tokenizer.odin b/core/encoding/xml/tokenizer.odin
index 95024518d..2da3b7683 100644
--- a/core/encoding/xml/tokenizer.odin
+++ b/core/encoding/xml/tokenizer.odin
@@ -403,11 +403,11 @@ scan :: proc(t: ^Tokenizer) -> Token {
case ':': kind = .Colon
case '"', '\'':
+ kind = .Invalid
+
lit, err = scan_string(t, t.offset, ch, true, false)
if err == .None {
kind = .String
- } else {
- kind = .Invalid
}
case '\n':
@@ -418,7 +418,7 @@ scan :: proc(t: ^Tokenizer) -> Token {
}
}
- if lit == "" {
+ if kind != .String && lit == "" {
lit = string(t.src[offset : t.offset])
}
return Token{kind, lit, pos}