diff options
Diffstat (limited to 'build/lexer.cxx')
-rw-r--r-- | build/lexer.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/build/lexer.cxx b/build/lexer.cxx index 101227e..8566788 100644 --- a/build/lexer.cxx +++ b/build/lexer.cxx @@ -56,8 +56,10 @@ namespace build if (!is_eos (c)) return c; - cerr << name_ << ':' << c.line () << ':' << c.column () << ": error: " << - "unterminated escape sequence" << endl; + if (!name_.empty ()) + cerr << name_ << ':' << c.line () << ':' << c.column () << ": error: " << + "unterminated escape sequence" << endl; + throw lexer_error (); } |