A syntax error This class represents a syntax error. You can get several informations about this error, such as the original_string(), the error_message(), the exact location of the error in the string (start_pos() and end_pos()). More...
#include <syntax.hh>
Public Member Functions | |
virtual int | is_syntax_error () |
Yes, this is a syntax error. | |
SyntaxError (Session *s, const char *str, const char *error, int st, int en) | |
std::string | original_string () |
The original string on which the error occured. | |
std::string | error_message () |
The error message. | |
int | start_pos () |
The starting position. | |
int | end_pos () |
The end position. | |
virtual std::string | pretty_print () |
Pretty prints the error message Returns a std::string containing a nice display of the error message, with a series of ^^^^ showing where the error occurred. This function assumes that all characters have the same display size. | |
Protected Attributes | |
std::string | original |
std::string | message |
int | start |
int | end |
A syntax error This class represents a syntax error. You can get several informations about this error, such as the original_string(), the error_message(), the exact location of the error in the string (start_pos() and end_pos()).