|
Bash++
Bash++ compiler internal documentation
|
Classes | |
| class | ErrorOrWarning |
| struct | InternalError |
| An exception thrown when an internal error occurs. More... | |
| class | SyntaxError |
| An exception thrown when a syntax error is encountered This exception can be constructed from any listener that satisfies the ErrorReportableListener concept, along with an AST node or token that satisfies the ASTNodePtrORToken concept. When thrown, the exception can be caught and printed to display a formatted syntax error message. More... | |
| class | Warning |
| A compiler warning that is not fatal to compilation This type should never be thrown. Instead, it should be constructed and displayed via the print() method. Throwing it would halt compilation, which is not desired for warnings. This class likewise can be constructed from any listener that satisfies the ErrorReportableListener concept, along with an AST node or token that satisfies the ASTNodePtrORToken concept. More... | |
Functions | |
| void | print_syntax_error_or_warning (const std::string &source_file, uint32_t line, uint32_t column, uint32_t text_length, const std::string &msg, const std::vector< std::string > &include_chain, std::shared_ptr< bpp::bpp_program > program, bool lsp_mode, bool is_warning=false) |
| Print a syntax error or warning message to stderr. | |
| void | print_syntax_error_from_parser (const std::string &source_file, uint32_t line, uint32_t start_column, uint32_t end_column, const std::string &msg, const std::vector< std::string > &include_chain) |
| std::string | utf8_substr (const std::string &str, uint32_t start, uint32_t length) |
| uint32_t | utf8_length (const std::string &str) |
| std::string | equal_width_padding (const std::string &str, char padding_char) |
| std::string bpp::ErrorHandling::equal_width_padding | ( | const std::string & | str, |
| char | padding_char | ||
| ) |
| void bpp::ErrorHandling::print_syntax_error_from_parser | ( | const std::string & | source_file, |
| uint32_t | line, | ||
| uint32_t | start_column, | ||
| uint32_t | end_column, | ||
| const std::string & | msg, | ||
| const std::vector< std::string > & | include_chain | ||
| ) |
| void bpp::ErrorHandling::print_syntax_error_or_warning | ( | const std::string & | source_file, |
| uint32_t | line, | ||
| uint32_t | column, | ||
| uint32_t | text_length, | ||
| const std::string & | msg, | ||
| const std::vector< std::string > & | include_chain, | ||
| std::shared_ptr< bpp::bpp_program > | program, | ||
| bool | lsp_mode, | ||
| bool | is_warning = false |
||
| ) |
Print a syntax error or warning message to stderr.
| source_file | The source file which contains the error |
| line | The line number where the error occurred |
| column | The column number where the error occurred |
| text_length | The length of the token which caused the error |
| msg | The error message to display |
| include_chain | A stack of include files which led to the error |
| is_warning | Whether the message is a warning or an error |
| uint32_t bpp::ErrorHandling::utf8_length | ( | const std::string & | str | ) |
| std::string bpp::ErrorHandling::utf8_substr | ( | const std::string & | str, |
| uint32_t | start, | ||
| uint32_t | length | ||
| ) |