add syntax checking with issue highlighting
This commit is contained in:
+13
-3
@@ -4,13 +4,23 @@
|
||||
#include "config.h"
|
||||
|
||||
#if DEBUG == 1
|
||||
#define pr_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__ << "\n"
|
||||
#define pri_debug(...) std::cout << __VA_ARGS__
|
||||
#define prs_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__
|
||||
#if PRINT_DISABLE_PREFIXES == 1
|
||||
#define pr_debug(...) std::cout << "debug: " << __VA_ARGS__ << "\n"
|
||||
#define pri_debug(...) std::cout << __VA_ARGS__
|
||||
#define prs_debug(...) std::cout << "debug: " << __VA_ARGS__
|
||||
#else
|
||||
#define pr_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__ << "\n"
|
||||
#define pri_debug(...) std::cout << __VA_ARGS__
|
||||
#define prs_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__
|
||||
#endif
|
||||
#else
|
||||
#define pr_debug(...) do {} while (0)
|
||||
#define pri_debug(...) do {} while (0)
|
||||
#define prs_debug(...) do {} while (0)
|
||||
#endif
|
||||
|
||||
#if PRINT_DISABLE_PREFIXES == 1
|
||||
#define pr_warn(...) std::cout << "warning: " << __VA_ARGS__ << "\n"
|
||||
#else
|
||||
#define pr_warn(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] warning: " << __VA_ARGS__ << "\n"
|
||||
#endif
|
||||
|
||||
+1
-6
@@ -6,12 +6,7 @@
|
||||
namespace Syntax
|
||||
{
|
||||
|
||||
struct SyntaxIssue
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
std::vector<SyntaxIssue> check_syntax(std::vector<Expression::Token>& tv);
|
||||
int check_syntax(std::vector<Expression::Token>& tv);
|
||||
void apply_corrections(std::vector<Expression::Token>& tv);
|
||||
std::vector<Expression::Operation> build_op_vector(const std::vector<Expression::Token>& tv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user