lang: ast: rename IVY_AST_STATIC_PKG_ITEM to IVY_AST_PKG_ITEM
This commit is contained in:
@@ -65,7 +65,7 @@ static const struct ast_node_type *node_ops[] = {
|
|||||||
[IVY_AST_LAMBDA] = &lambda_node_ops,
|
[IVY_AST_LAMBDA] = &lambda_node_ops,
|
||||||
[IVY_AST_PKG] = &pkg_node_ops,
|
[IVY_AST_PKG] = &pkg_node_ops,
|
||||||
[IVY_AST_PKG_STATIC] = &pkg_static_node_ops,
|
[IVY_AST_PKG_STATIC] = &pkg_static_node_ops,
|
||||||
[IVY_AST_PKG_STATIC_ITEM] = &pkg_static_item_node_ops,
|
[IVY_AST_PKG_ITEM] = &pkg_static_item_node_ops,
|
||||||
[IVY_AST_PKG_DYNAMIC] = &pkg_dynamic_node_ops,
|
[IVY_AST_PKG_DYNAMIC] = &pkg_dynamic_node_ops,
|
||||||
[IVY_AST_DISCARD] = &discard_node_ops,
|
[IVY_AST_DISCARD] = &discard_node_ops,
|
||||||
};
|
};
|
||||||
@@ -277,7 +277,7 @@ const char *ivy_ast_node_type_to_string(enum ivy_ast_node_type v)
|
|||||||
ENUM_STR(IVY_AST_BLOCK);
|
ENUM_STR(IVY_AST_BLOCK);
|
||||||
ENUM_STR(IVY_AST_PKG);
|
ENUM_STR(IVY_AST_PKG);
|
||||||
ENUM_STR(IVY_AST_PKG_STATIC);
|
ENUM_STR(IVY_AST_PKG_STATIC);
|
||||||
ENUM_STR(IVY_AST_PKG_STATIC_ITEM);
|
ENUM_STR(IVY_AST_PKG_ITEM);
|
||||||
ENUM_STR(IVY_AST_PKG_DYNAMIC);
|
ENUM_STR(IVY_AST_PKG_DYNAMIC);
|
||||||
ENUM_STR(IVY_AST_RETURN);
|
ENUM_STR(IVY_AST_RETURN);
|
||||||
ENUM_STR(IVY_AST_TYPE_COUNT);
|
ENUM_STR(IVY_AST_TYPE_COUNT);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ struct package_parser_state {
|
|||||||
|
|
||||||
static enum ivy_status add_package_item(struct package_parser_state *state, struct ivy_ast_node *index, struct ivy_ast_node *value)
|
static enum ivy_status add_package_item(struct package_parser_state *state, struct ivy_ast_node *index, struct ivy_ast_node *value)
|
||||||
{
|
{
|
||||||
struct ivy_ast_pkg_static_item_node *item = (struct ivy_ast_pkg_static_item_node *)ast_node_create(IVY_AST_PKG_STATIC_ITEM);
|
struct ivy_ast_pkg_static_item_node *item = (struct ivy_ast_pkg_static_item_node *)ast_node_create(IVY_AST_PKG_ITEM);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return IVY_ERR_NO_MEMORY;
|
return IVY_ERR_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ enum ivy_ast_node_type {
|
|||||||
IVY_AST_LAMBDA,
|
IVY_AST_LAMBDA,
|
||||||
IVY_AST_UNIT_PACKAGE,
|
IVY_AST_UNIT_PACKAGE,
|
||||||
IVY_AST_UNIT_IMPORT,
|
IVY_AST_UNIT_IMPORT,
|
||||||
IVY_AST_EXPR,
|
|
||||||
IVY_AST_DISCARD,
|
IVY_AST_DISCARD,
|
||||||
IVY_AST_INT,
|
IVY_AST_INT,
|
||||||
IVY_AST_DOUBLE,
|
IVY_AST_DOUBLE,
|
||||||
@@ -40,10 +39,16 @@ enum ivy_ast_node_type {
|
|||||||
IVY_AST_COND_GROUP,
|
IVY_AST_COND_GROUP,
|
||||||
IVY_AST_COND,
|
IVY_AST_COND,
|
||||||
IVY_AST_TUPLE,
|
IVY_AST_TUPLE,
|
||||||
IVY_AST_PKG,
|
|
||||||
IVY_AST_PKG_STATIC,
|
IVY_AST_PKG_STATIC,
|
||||||
IVY_AST_PKG_STATIC_ITEM,
|
IVY_AST_PKG_ITEM,
|
||||||
IVY_AST_PKG_DYNAMIC,
|
IVY_AST_PKG_DYNAMIC,
|
||||||
|
|
||||||
|
/* these are pseudo-types. a finished AST will never have these nodes in it,
|
||||||
|
* but they are necessary to identifier AST parsers that will produce nodes
|
||||||
|
* of other, related types. */
|
||||||
|
IVY_AST_PKG,
|
||||||
|
IVY_AST_EXPR,
|
||||||
|
|
||||||
IVY_AST_TYPE_COUNT,
|
IVY_AST_TYPE_COUNT,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user