aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/lexer.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/lexer.hxx')
-rw-r--r--libbuild2/lexer.hxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/libbuild2/lexer.hxx b/libbuild2/lexer.hxx
index 93992b4..e9a3149 100644
--- a/libbuild2/lexer.hxx
+++ b/libbuild2/lexer.hxx
@@ -7,6 +7,7 @@
#include <stack>
#include <libbutl/utf8.mxx>
+#include <libbutl/unicode.mxx>
#include <libbutl/char-scanner.mxx>
#include <libbuild2/types.hxx>
@@ -201,10 +202,14 @@ namespace build2
lexer (istream& is, const path_name& name, uint64_t line,
const char* escapes,
bool set_mode)
- : char_scanner (is, true /* crlf */, line),
- fail ("error", &name),
- name_ (name),
- sep_ (false)
+ : char_scanner (is,
+ butl::utf8_validator (butl::codepoint_types::graphic,
+ U"\n\r\t"),
+ true /* crlf */,
+ line),
+ fail ("error", &name),
+ name_ (name),
+ sep_ (false)
{
if (set_mode)
mode (lexer_mode::normal, '@', escapes);