lang: ast: implement parsing of true/false/null keyword constants

This commit is contained in:
2025-09-08 15:56:03 +01:00
parent bf250179da
commit 8ab377b3ab
5 changed files with 46 additions and 0 deletions

View File

@@ -119,6 +119,15 @@ enum ivy_status arith_push_operand(
case IVY_KW_CONTINUE:
v = ast_node_create(IVY_AST_LOOP_REPEAT);
break;
case IVY_KW_TRUE:
v = ast_node_create(IVY_AST_C_TRUE);
break;
case IVY_KW_FALSE:
v = ast_node_create(IVY_AST_C_FALSE);
break;
case IVY_KW_NULL:
v = ast_node_create(IVY_AST_C_NULL);
break;
default:
return IVY_ERR_BAD_SYNTAX;
}