From 07e0d37aba5cd72ff2d53eda654a4d5466e38627 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 8 Nov 2019 00:17:47 +0300 Subject: Use path_name for `-` to stdin/stdout translation --- libbuild2/lexer.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libbuild2/lexer.hxx') diff --git a/libbuild2/lexer.hxx b/libbuild2/lexer.hxx index bd2ac74..59debc4 100644 --- a/libbuild2/lexer.hxx +++ b/libbuild2/lexer.hxx @@ -88,12 +88,12 @@ namespace build2 // copied. // lexer (istream& is, - const path& name, + const path_name& name, uint64_t line = 1, // Start line in the stream. const char* escapes = nullptr) : lexer (is, name, line, escapes, true /* set_mode */) {} - const path& + const path_name& name () const {return name_;} // Note: sets mode for the next token. The second argument can be used to @@ -181,7 +181,7 @@ namespace build2 // Lexer state. // protected: - lexer (istream& is, const path& name, uint64_t line, + lexer (istream& is, const path_name& name, uint64_t line, const char* escapes, bool set_mode) : char_scanner (is, true /* crlf */, line), @@ -193,7 +193,7 @@ namespace build2 mode (lexer_mode::normal, '@', escapes); } - const path& name_; + const path_name& name_; std::stack state_; bool sep_; // True if we skipped spaces in peek(). @@ -210,7 +210,7 @@ namespace butl // ADL using namespace build2; assert (data != nullptr); // E.g., must be &lexer::name_. - return location (static_cast (data), c.line, c.column); + return location (*static_cast (data), c.line, c.column); } } -- cgit v1.1