aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-03-05 20:59:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-03-05 20:59:48 +0300
commit66a782233011b662378c44a4c5a9ac4af78ce151 (patch)
tree6072a326d8110320d10ec1f8a3e534ba727a1ad3
parent68b04627f42213650129edb38725a2868f9a632e (diff)
Use utf8_validator for buildfile and testscript lexers
-rw-r--r--libbuild2/lexer.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbuild2/lexer.hxx b/libbuild2/lexer.hxx
index 65a9ba6..93992b4 100644
--- a/libbuild2/lexer.hxx
+++ b/libbuild2/lexer.hxx
@@ -6,6 +6,7 @@
#include <stack>
+#include <libbutl/utf8.mxx>
#include <libbutl/char-scanner.mxx>
#include <libbuild2/types.hxx>
@@ -88,7 +89,8 @@ namespace build2
lexer_mode (base_type v): base_type (v) {}
};
- class LIBBUILD2_SYMEXPORT lexer: public butl::char_scanner<>
+ class LIBBUILD2_SYMEXPORT lexer:
+ public butl::char_scanner<butl::utf8_validator>
{
public:
// If escape is not NULL then only escape sequences with characters from
@@ -220,7 +222,8 @@ namespace build2
namespace butl // ADL
{
inline build2::location
- get_location (const butl::char_scanner<>::xchar& c, const void* data)
+ get_location (const butl::char_scanner<butl::utf8_validator>::xchar& c,
+ const void* data)
{
using namespace build2;