diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-06-18 16:40:00 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-19 11:27:32 +0200 |
commit | 112a83c346a537f1a5eac6fc17ee2ce3143d625b (patch) | |
tree | 11ed26fb72a571299eba7e02a225eaf07e527c58 /libbuild2/lexer.cxx | |
parent | 78ac6aee6dff1b608bc312fe7ada442ba83710e8 (diff) |
Fix lexer to fail on invalid UTF-8 sequences
Diffstat (limited to 'libbuild2/lexer.cxx')
-rw-r--r-- | libbuild2/lexer.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbuild2/lexer.cxx b/libbuild2/lexer.cxx index 4256422..ff7be02 100644 --- a/libbuild2/lexer.cxx +++ b/libbuild2/lexer.cxx @@ -11,6 +11,12 @@ namespace build2 { using type = token_type; + [[noreturn]] void lexer:: + fail_char (const xchar& c) + { + fail (c) << ebuf_ << endf; + } + pair<pair<char, char>, bool> lexer:: peek_chars () { |