aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/token.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/token.hxx
parent5935476651cd063a53d08ec33b04513a7a8127e3 (diff)
Use path_name for `-` to stdin/stdout translation
Diffstat (limited to 'libbuild2/token.hxx')
-rw-r--r--libbuild2/token.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/libbuild2/token.hxx b/libbuild2/token.hxx
index 0ee5248..2370f8d 100644
--- a/libbuild2/token.hxx
+++ b/libbuild2/token.hxx
@@ -161,32 +161,32 @@ namespace build2
struct replay_token
{
build2::token token;
- const path* file;
+ const path_name* file;
lexer_mode_base mode;
using location_type = build2::location;
location_type
- location () const {return location_type (file, token.line, token.column);}
+ location () const {return location_type (*file, token.line, token.column);}
};
using replay_tokens = vector<replay_token>;
// Diagnostics plumbing. We assume that any diag stream for which we can use
- // token as location has its aux data pointing to pointer to path.
+ // token as location has its aux data pointing to pointer to path name.
//
inline location
- get_location (const token& t, const path& p)
+ get_location (const token& t, const path_name& pn)
{
- return location (&p, t.line, t.column);
+ return location (pn, t.line, t.column);
}
inline location
get_location (const token& t, const void* data)
{
assert (data != nullptr); // E.g., must be &parser::path_.
- const path* p (*static_cast<const path* const*> (data));
- return get_location (t, *p);
+ const path_name* pn (*static_cast<const path_name* const*> (data));
+ return get_location (t, *pn);
}
}