diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-12-02 18:00:29 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-12-05 02:52:23 +0100 |
| commit | 580721440657a9fe5334b6bf095fb70b584fa4f6 (patch) | |
| tree | ba857c3ce7cdd42d8da515a39e27da0d1162d54d /core/encoding/xml/tokenizer.odin | |
| parent | 23baf56c8784901f67970760db5025c9c9f03b67 (diff) | |
[xml] Improvements.
Diffstat (limited to 'core/encoding/xml/tokenizer.odin')
| -rw-r--r-- | core/encoding/xml/tokenizer.odin | 6 |
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} |