diff options
Diffstat (limited to 'lib/xixanta/src/parser.rs')
| -rw-r--r-- | lib/xixanta/src/parser.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xixanta/src/parser.rs b/lib/xixanta/src/parser.rs index d42ff12..524f7c2 100644 --- a/lib/xixanta/src/parser.rs +++ b/lib/xixanta/src/parser.rs @@ -902,6 +902,10 @@ impl Parser { // character (unless it was escaped through '\'). let mut prev = '"'; for ch in line.get(self.offset..).unwrap_or("").chars() { + if !ch.is_ascii() { + return Err(self.parser_error("using non-ASCII characters in a string")); + } + if ch == '"' && prev != '\\' { self.next(); |
