rename types
This commit is contained in:
30
ast.h
30
ast.h
@@ -479,23 +479,23 @@ typedef enum {
|
||||
AST_NODE_TAG_ERROR_VALUE,
|
||||
/// `lhs!rhs`. main_token is the `!`.
|
||||
AST_NODE_TAG_ERROR_UNION,
|
||||
} astNodeTag;
|
||||
} AstNodeTag;
|
||||
|
||||
typedef int32_t astTokenIndex;
|
||||
typedef uint32_t astNodeIndex;
|
||||
typedef uint32_t astIndex;
|
||||
typedef int32_t AstTokenIndex;
|
||||
typedef uint32_t AstNodeIndex;
|
||||
typedef uint32_t AstIndex;
|
||||
|
||||
typedef struct {
|
||||
astIndex lhs, rhs;
|
||||
} astData;
|
||||
AstIndex lhs, rhs;
|
||||
} AstData;
|
||||
|
||||
typedef struct {
|
||||
uint32_t len;
|
||||
uint32_t cap;
|
||||
astNodeTag* tags;
|
||||
astTokenIndex* main_tokens;
|
||||
astData* datas;
|
||||
} astNodeList;
|
||||
AstNodeTag* tags;
|
||||
AstTokenIndex* main_tokens;
|
||||
AstData* datas;
|
||||
} AstNodeList;
|
||||
|
||||
typedef struct {
|
||||
const char* source;
|
||||
@@ -503,16 +503,16 @@ typedef struct {
|
||||
|
||||
struct {
|
||||
uint32_t len;
|
||||
tokenizerTag* tags;
|
||||
astIndex* starts;
|
||||
TokenizerTag* tags;
|
||||
AstIndex* starts;
|
||||
} tokens;
|
||||
|
||||
astNodeList nodes;
|
||||
AstNodeList nodes;
|
||||
|
||||
astNodeIndex* extra_data;
|
||||
AstNodeIndex* extra_data;
|
||||
uint32_t extra_data_len;
|
||||
} ast;
|
||||
|
||||
ast ast_parse(const char* source, uint32_t len, int* err);
|
||||
ast astParse(const char* source, uint32_t len);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user