forgot about the not operator 🥀

This commit is contained in:
SpookyDervish
2025-10-14 21:30:56 +11:00
parent 3d9208f0f8
commit bf0f9a9348
4 changed files with 14 additions and 109 deletions

View File

@@ -218,6 +218,9 @@ class Compiler:
case "==":
value = self.builder.icmp_signed('==', left_value, right_value)
Type = ir.IntType(1)
case "!=":
value = self.builder.icmp_signed('!=', left_value, right_value)
Type = ir.IntType(1)
elif isinstance(right_type, ir.FloatType) and isinstance(left_type, ir.FloatType):
Type = self.type_map["Float"]
match operator:
@@ -249,6 +252,9 @@ class Compiler:
case "==":
value = self.builder.fcmp_ordered('==', left_value, right_value)
Type = ir.IntType(1)
case "!=":
value = self.builder.fcmp_ordered('!=', left_value, right_value)
Type = ir.IntType(1)
return value, Type
# endregion