summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-08-03 21:10:52 +0100
committerubq323 <ubq323@ubq323.website>2023-08-04 00:06:49 +0100
commit8b96f9a4f27ed859bdd975608419c86841664dc9 (patch)
treea25857d80ebb559bd0f7c3c2943b61e619c9f4f4 /ast.c
parent7dcbac1a3ce1c6fd87d79a0b76cdb20c8f090184 (diff)
rename "symbol" to "ident" everywhere
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ast.c b/ast.c
index d0a7ffe..fda03d3 100644
--- a/ast.c
+++ b/ast.c
@@ -48,9 +48,9 @@ AstNode astnode_new_list() {
};
}
-AstNode astnode_new_symbol(char *s) {
+AstNode astnode_new_ident(char *s) {
return (AstNode){
- .ty =AST_SYMBOL,
+ .ty =AST_IDENT,
.as = {
.str = s
}
@@ -79,7 +79,7 @@ void astnode_disp(AstNode *a) {
}
printf(")");
break;
- case AST_SYMBOL:
+ case AST_IDENT:
case AST_STRING:
printf("%s:%s ",ast_ty_to_str(a->ty), a->as.str);
break;
@@ -88,7 +88,7 @@ void astnode_disp(AstNode *a) {
}
const char* ty_names[] = {
- "list", "num", "symbol", "string"
+ "list", "num", "ident", "string"
};
const char *ast_ty_to_str(AstTy ty) {
return ty_names[ty];