fix(frontends/lean/parser): error line numbers for lua code, fixes #194
This commit is contained in:
parent
841658ec37
commit
d47412d201
2 changed files with 6 additions and 0 deletions
|
@ -205,6 +205,11 @@ void parser::display_error(exception const & ex) {
|
||||||
::lean::display_error(regular_stream(), &pos_provider, ex);
|
::lean::display_error(regular_stream(), &pos_provider, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void parser::display_error(script_exception const & ex) {
|
||||||
|
parser_pos_provider pos_provider(m_pos_table, get_stream_name(), m_last_script_pos);
|
||||||
|
::lean::display_error(regular_stream(), &pos_provider, ex);
|
||||||
|
}
|
||||||
|
|
||||||
void parser::throw_parser_exception(char const * msg, pos_info p) {
|
void parser::throw_parser_exception(char const * msg, pos_info p) {
|
||||||
throw parser_exception(msg, get_stream_name().c_str(), p.first, p.second);
|
throw parser_exception(msg, get_stream_name().c_str(), p.first, p.second);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,7 @@ class parser {
|
||||||
void display_error(char const * msg, unsigned line, unsigned pos);
|
void display_error(char const * msg, unsigned line, unsigned pos);
|
||||||
void display_error(char const * msg, pos_info p);
|
void display_error(char const * msg, pos_info p);
|
||||||
void display_error(exception const & ex);
|
void display_error(exception const & ex);
|
||||||
|
void display_error(script_exception const & ex);
|
||||||
void throw_parser_exception(char const * msg, pos_info p);
|
void throw_parser_exception(char const * msg, pos_info p);
|
||||||
void throw_nested_exception(exception & ex, pos_info p);
|
void throw_nested_exception(exception & ex, pos_info p);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue