lang: ast: add diag support to parser
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
#define _AST_CTX_H_
|
||||
|
||||
#include <blue/core/queue.h>
|
||||
#include <ivy/diag.h>
|
||||
#include <ivy/lang/ast.h>
|
||||
#include <ivy/lang/diag.h>
|
||||
#include <ivy/status.h>
|
||||
|
||||
#define parser_get_state(parser, state_type) \
|
||||
@@ -19,6 +21,7 @@ struct parser_state {
|
||||
|
||||
struct ivy_parser {
|
||||
enum ivy_status p_status;
|
||||
struct ivy_diag_ctx *p_diag_ctx;
|
||||
b_queue p_state;
|
||||
b_queue p_token_queue;
|
||||
b_queue p_node_queue;
|
||||
@@ -40,4 +43,8 @@ extern void parser_replace_current_node(
|
||||
extern enum ivy_status parser_add_child(
|
||||
struct ivy_parser *parser, struct ivy_ast_node *new_node);
|
||||
|
||||
extern struct ivy_diag *parser_push_diag(
|
||||
struct ivy_parser *parser, unsigned long diag_class, unsigned long msg,
|
||||
struct ivy_token *tok);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user