feat: implement format strings

This commit is contained in:
samsonium
2026-10-28 17:57:18 +03:00
parent ea28c470d2
commit e11089c90f
11 changed files with 354 additions and 7 deletions
+2
View File
@@ -35,6 +35,8 @@ typedef enum
FZL_OPCODE_MOD = 0xA00006, // Get module of two numbers in dstack
FZL_OPCODE_NEG = 0xA00007, // Negotiate number in dstack
FZL_OPCODE_BUILD_STR = 0xA10001, // Build a string from N values in dstack
FZL_OPCODE_CMP_EQ = 0xB00001, // Equal
FZL_OPCODE_CMP_NEQ = 0xB00002, // Not equal
FZL_OPCODE_CMP_LT = 0xB00003, // Less than
+1
View File
@@ -11,6 +11,7 @@ typedef enum
FZL_NODETYPE_BLOCK,
FZL_NODETYPE_CALL,
FZL_NODETYPE_LITERAL,
FZL_NODETYPE_FMT_STRING,
FZL_NODETYPE_IDENTIFIER,
FZL_NODETYPE_CONDITIONAL,
FZL_NODETYPE_FUNCTION,
+3
View File
@@ -40,6 +40,9 @@ typedef enum
FZL_TOKTYPE_BOOL_LITERAL, // true
FZL_TOKTYPE_NULL_LITERAL, // null
FZL_TOKTYPE_STR_FORMAT_START, // `$` before `"`
FZL_TOKTYPE_STR_FORMAT_END, // end of string formatting sequence
FZL_TOKTYPE_DAMPERSAND, // &&
FZL_TOKTYPE_DVBAR, // ||