feat: implement AST walker

This commit is contained in:
samsonium
2026-10-10 02:40:53 +03:00
parent 2fabd0ec2d
commit e979a22739
9 changed files with 469 additions and 17 deletions
+9
View File
@@ -0,0 +1,9 @@
#ifndef FZL_BUILTINS_H
#define FZL_BUILTINS_H
typedef enum
{
FZL_BUILTIN_PRINTLINE // Print message in arg with newline at end
} fzl_builtin_t;
#endif // FZL_BUILTINS_H
+12
View File
@@ -0,0 +1,12 @@
#ifndef FZL_OPCODES_H
#define FZL_OPCODES_H
// Available opcodes
typedef enum
{
FZL_OPCODE_LOADCONST, // Load const into T (temp) reg
FZL_OPCODE_PUSHARG, // Push argument from T into args stack
FZL_OPCODE_CALL_BUILTIN // Call builtin function
} fzl_opcode_t;
#endif // FZL_OPCODES_H