From 112a83c346a537f1a5eac6fc17ee2ce3143d625b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 18 Jun 2020 16:40:00 +0300 Subject: Fix lexer to fail on invalid UTF-8 sequences --- libbuild2/lexer.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2/lexer.cxx') 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, bool> lexer:: peek_chars () { -- cgit v1.1