aboutsummaryrefslogtreecommitdiff
path: root/build2/lexer
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-23 11:14:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-23 11:14:05 +0200
commitdb0edaafe15831ba6fa9c2109da37942506c62b1 (patch)
tree320dfcbf16b553c162cd079d633f16b6054b9740 /build2/lexer
parent19c37866524f60a7710b256dd13bf1da9f8cff16 (diff)
Cleanup absolute/relative path diagnostics by introducing stream verbosity
Diffstat (limited to 'build2/lexer')
-rw-r--r--build2/lexer8
1 files changed, 4 insertions, 4 deletions
diff --git a/build2/lexer b/build2/lexer
index 69ca0a8..06f2b24 100644
--- a/build2/lexer
+++ b/build2/lexer
@@ -44,14 +44,14 @@ namespace build2
{
public:
lexer (std::istream& is,
- const std::string& name,
+ const path& name,
void (*processor) (token&, const lexer&) = nullptr)
: char_scanner (is), fail (name), processor_ (processor), sep_ (false)
{
mode_.push (lexer_mode::normal);
}
- const std::string&
+ const path&
name () const {return fail.name_;}
// Note: sets mode for the next token. If mode is pairs, then
@@ -115,12 +115,12 @@ namespace build2
private:
struct fail_mark_base: build2::fail_mark_base<failed>
{
- fail_mark_base (const std::string& n): name_ (n) {}
+ fail_mark_base (const path& n): name_ (n) {}
location_prologue
operator() (const xchar&) const;
- std::string name_;
+ path name_;
};
typedef diag_mark<fail_mark_base> fail_mark;