Bash++
Bash++ compiler internal documentation
Classes | Namespaces | Functions
SyntaxError.h File Reference
#include <string>
#include <stack>
#include <memory>
#include <cstdint>
#include <stdexcept>
#include <bpp_include/bpp.h>
#include <error/detail.h>
Include dependency graph for SyntaxError.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bpp::ErrorHandling::ErrorOrWarning
 
class  bpp::ErrorHandling::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  bpp::ErrorHandling::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...
 

Namespaces

namespace  bpp
 
namespace  bpp::ErrorHandling
 

Functions

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.
 
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)
 
std::string bpp::ErrorHandling::utf8_substr (const std::string &str, uint32_t start, uint32_t length)
 
uint32_t bpp::ErrorHandling::utf8_length (const std::string &str)
 
std::string bpp::ErrorHandling::equal_width_padding (const std::string &str, char padding_char)