#include <iostream>
#include <vector>
#include <set>
#include <list>
#include <memory>
#include <stack>
#include <antlr4-runtime.h>
#include "../antlr/BashppParserBaseListener.h"
#include "../bpp_include/bpp_codegen.h"
#include "../bpp_include/bpp.h"
#include "../syntax_error.cpp"
#include "../internal_error.cpp"
Go to the source code of this file.
◆ output_syntax_error
#define output_syntax_error |
( |
|
symbol, |
|
|
|
msg |
|
) |
| |
Value: int line = static_cast<int>(symbol->getLine()); \
int column = static_cast<int>(symbol->getCharPositionInLine()); \
std::string text = symbol->getText(); \
print_syntax_error_or_warning(source_file, line, column, text, msg, get_include_stack()); \
program_has_errors = true;
◆ set_error_context
#define set_error_context error_thrown = true; error_context = ctx; |
◆ show_warning
#define show_warning |
( |
|
token, |
|
|
|
msg |
|
) |
| |
Value: antlr4::Token* symbol = token->getSymbol(); \
show_warning_sym(symbol, msg)
◆ show_warning_sym
#define show_warning_sym |
( |
|
symbol, |
|
|
|
msg |
|
) |
| |
Value: if (!suppress_warnings) { \
int line = static_cast<int>(symbol->getLine()); \
int column = static_cast<int>(symbol->getCharPositionInLine()); \
std::string text = symbol->getText(); \
print_syntax_error_or_warning(source_file, line, column, text, msg, get_include_stack(), true); \
}
◆ skip_syntax_errors
#define skip_syntax_errors |
Value: if (error_thrown) { \
if (error_context == ctx) { \
error_thrown = false; \
error_context = nullptr; \
} \
return; \
}
◆ throw_syntax_error
#define throw_syntax_error |
( |
|
token, |
|
|
|
msg |
|
) |
| |
Value: antlr4::Token* symbol = token->getSymbol(); \
throw_syntax_error_sym(symbol, msg) \
set_error_context \
return;
◆ throw_syntax_error_from_exitRule
#define throw_syntax_error_from_exitRule |
( |
|
token, |
|
|
|
msg |
|
) |
| |
Value: antlr4::Token* symbol = token->getSymbol(); \
output_syntax_error(symbol, msg) \
return;
◆ throw_syntax_error_sym
#define throw_syntax_error_sym |
( |
|
symbol, |
|
|
|
msg |
|
) |
| |
Value:
set_error_context \
return;
#define output_syntax_error(symbol, msg)
Definition: BashppListener.h:150
◆ code_segment