aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/xml
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-11-30 23:43:51 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-12-05 02:52:22 +0100
commit9b2e67df67b5f801687f3c48c6701daa00c38088 (patch)
treeff45a60c0114ac3982813d54d1f575e5863f2237 /core/encoding/xml
parentb5c828fe4ee3f0942b2eda1dc5753e4ad6d38ea9 (diff)
[xml] Small cleanup.
Diffstat (limited to 'core/encoding/xml')
-rw-r--r--core/encoding/xml/tokenizer.odin12
1 files changed, 1 insertions, 11 deletions
diff --git a/core/encoding/xml/tokenizer.odin b/core/encoding/xml/tokenizer.odin
index a63dca5bd..3dcffb0d6 100644
--- a/core/encoding/xml/tokenizer.odin
+++ b/core/encoding/xml/tokenizer.odin
@@ -180,7 +180,7 @@ is_valid_identifier_rune :: proc(r: rune) -> bool {
}
}
- if unicode.is_digit(r) || unicode.is_letter(r) {
+ if unicode.is_letter(r) || unicode.is_digit(r) {
return true
}
return false
@@ -317,17 +317,7 @@ scan :: proc(t: ^Tokenizer) -> Token {
case '\n':
lit = "\n"
- case '\\':
- token := scan(t)
- if token.pos.line == pos.line {
- error(t, token.pos.offset, "expected a newline after \\")
- }
- return token
-
case:
- if ch != utf8.RUNE_BOM {
- // error(t, t.offset, "illegal character '%r': %d", ch, ch)
- }
kind = .Invalid
}
}