diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-06 06:58:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:35:29 +0200 |
commit | fa717b42574fe1a7c0c07393f6790595d39c33ae (patch) | |
tree | ecd90d87656526d83acd45aaaeb56c3d4ef6aa98 /libbuild2/test | |
parent | ca7db0a1b856909efe127d3b47b50a0144e5c2c9 (diff) |
Add lexer mode data
Diffstat (limited to 'libbuild2/test')
-rw-r--r-- | libbuild2/test/script/lexer.cxx | 4 | ||||
-rw-r--r-- | libbuild2/test/script/lexer.hxx | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libbuild2/test/script/lexer.cxx b/libbuild2/test/script/lexer.cxx index 4683bc7..1eeb0be 100644 --- a/libbuild2/test/script/lexer.cxx +++ b/libbuild2/test/script/lexer.cxx @@ -16,7 +16,7 @@ namespace build2 using type = token_type; void lexer:: - mode (base_mode m, char ps, optional<const char*> esc) + mode (base_mode m, char ps, optional<const char*> esc, uintptr_t data) { bool a (false); // attributes @@ -138,7 +138,7 @@ namespace build2 } assert (ps == '\0'); - state_.push (state {m, a, ps, s, n, q, *esc, s1, s2}); + state_.push (state {m, data, a, ps, s, n, q, *esc, s1, s2}); } token lexer:: diff --git a/libbuild2/test/script/lexer.hxx b/libbuild2/test/script/lexer.hxx index 5763e3b..4c51303 100644 --- a/libbuild2/test/script/lexer.hxx +++ b/libbuild2/test/script/lexer.hxx @@ -60,7 +60,8 @@ namespace build2 virtual void mode (base_mode, char = '\0', - optional<const char*> = nullopt) override; + optional<const char*> = nullopt, + uintptr_t = 0) override; // Number of quoted (double or single) tokens since last reset. // |