summaryrefslogtreecommitdiff
path: root/src/runner/runner.c
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-13 18:39:08 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-02-13 18:40:23 +0330
commitcb6eaf13c3b3b58779a18255177589d8d5fbf85b (patch)
tree40e648d02dc450bdda7bd4e31503b76ab4bf0a69 /src/runner/runner.c
parent0ff9508bb0ea7193b0101c3cd9b4ae594e44fd02 (diff)
add i8 u8 i16 u16 i32 u32
add overflow warning
Diffstat (limited to 'src/runner/runner.c')
-rw-r--r--src/runner/runner.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c
index 2ab97a9..4f2a002 100644
--- a/src/runner/runner.c
+++ b/src/runner/runner.c
@@ -328,7 +328,19 @@ AstTree *calcAstTreeValue(AstTree *tree, RunnerVariablePages *pages) {
if ((left->type == &AST_TREE_U64_TYPE &&
right->type == &AST_TREE_U64_TYPE) ||
(left->type == &AST_TREE_I64_TYPE &&
- right->type == &AST_TREE_I64_TYPE)) {
+ right->type == &AST_TREE_I64_TYPE) ||
+ (left->type == &AST_TREE_U32_TYPE &&
+ right->type == &AST_TREE_U32_TYPE) ||
+ (left->type == &AST_TREE_I32_TYPE &&
+ right->type == &AST_TREE_I32_TYPE) ||
+ (left->type == &AST_TREE_U16_TYPE &&
+ right->type == &AST_TREE_U16_TYPE) ||
+ (left->type == &AST_TREE_I16_TYPE &&
+ right->type == &AST_TREE_I16_TYPE) ||
+ (left->type == &AST_TREE_U8_TYPE &&
+ right->type == &AST_TREE_U8_TYPE) ||
+ (left->type == &AST_TREE_I8_TYPE &&
+ right->type == &AST_TREE_I8_TYPE)) {
if (left->token == AST_TREE_TOKEN_VALUE_INT &&
right->token == AST_TREE_TOKEN_VALUE_INT) {
switch (tree->token) {