aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/lexer.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-11-08 00:17:47 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-11-11 18:41:06 +0300
commit07e0d37aba5cd72ff2d53eda654a4d5466e38627 (patch)
tree80ab6452b0fc489833fb911926ca872e51ec1575 /libbuild2/lexer.hxx
parent5935476651cd063a53d08ec33b04513a7a8127e3 (diff)
Use path_name for `-` to stdin/stdout translation
Diffstat (limited to 'libbuild2/lexer.hxx')
-rw-r--r--libbuild2/lexer.hxx10
1 files changed, 5 insertions, 5 deletions
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> 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<const path*> (data), c.line, c.column);
+ return location (*static_cast<const path_name*> (data), c.line, c.column);
}
}