SolsNode stores line info
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
#define SOLSNODE_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <groundvm.h>
|
||||
|
||||
#include "../include/error.h"
|
||||
|
||||
#include "../lexer/SolsType.h"
|
||||
#include "../lexer/SolsLiteral.h"
|
||||
#include "../lexer/SolsToken.h"
|
||||
|
||||
typedef enum SolsNodeType {
|
||||
SNT_IDENTIFIER, SNT_LITERAL, SNT_TYPE, SNT_CODE_BLOCK, SNT_OP_ADD, SNT_OP_SUB, SNT_OP_MUL, SNT_OP_DIV, SNT_OP_ADDTO, SNT_OP_SUBTO, SNT_OP_MULTO, SNT_OP_DIVTO, SNT_OP_INCREMENT, SNT_OP_DECREMENT, SNT_OP_SET, SNT_OP_GREATER, SNT_OP_LESSER, SNT_OP_EQUAL, SNT_OP_INEQUAL, SNT_OP_EQGREATER, SNT_OP_EQLESSER, SNT_DEF, SNT_STRUCT, SNT_PUTS, SNT_IF, SNT_WHILE, SNT_NEW, SNT_GROUND, SNT_ROOT
|
||||
@@ -35,6 +37,10 @@ typedef struct SolsNode {
|
||||
size_t capacity;
|
||||
struct SolsNode* at;
|
||||
} children;
|
||||
LineInfo line;
|
||||
|
||||
// Used by the code generator, do not use in the parser!
|
||||
GroundArg accessArg;
|
||||
} SolsNode;
|
||||
|
||||
Result(SolsNode, charptr);
|
||||
|
||||
Reference in New Issue
Block a user