aboutsummaryrefslogtreecommitdiff
path: root/build/lexer.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-01-20 17:18:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-01-20 17:18:09 +0200
commitb0524a0b18eec9d5e5c3f6ce30b6cecdd02a6306 (patch)
tree4b1efc586782507e0647e884d6a13c6605298508 /build/lexer.cxx
parent47751abc43dab40e0ac4a1523994fd533e6a3b22 (diff)
Diagnostic infrastructure revamp
Diffstat (limited to 'build/lexer.cxx')
-rw-r--r--build/lexer.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/build/lexer.cxx b/build/lexer.cxx
index a1aa375..ea11680 100644
--- a/build/lexer.cxx
+++ b/build/lexer.cxx
@@ -4,8 +4,6 @@
#include <build/lexer>
-#include <iostream>
-
using namespace std;
namespace build
@@ -56,8 +54,7 @@ namespace build
if (!is_eos (c))
return c;
- error (c) << "unterminated escape sequence" << endl;
- throw lexer_error ();
+ fail (c) << "unterminated escape sequence";
}
void lexer::
@@ -217,10 +214,10 @@ namespace build
unget_ = true;
}
- ostream& lexer::
- error (const xchar& c)
+ location_prologue lexer::fail_mark_base::
+ operator() (const xchar& c) const
{
- return diag_ << name_ << ':' << c.line () << ':' <<
- c.column () << ": error: ";
+ return build::fail_mark_base<failed>::operator() (
+ location (name_.c_str (), c.line (), c.column ()));
}
}