diff --git a/DIVI/src/compiler/__pycache__/compile.cpython-38.pyc b/DIVI/src/compiler/__pycache__/compile.cpython-38.pyc index dee2510..1e26ca7 100644 Binary files a/DIVI/src/compiler/__pycache__/compile.cpython-38.pyc and b/DIVI/src/compiler/__pycache__/compile.cpython-38.pyc differ diff --git a/DIVI/src/compiler/compile.py b/DIVI/src/compiler/compile.py index 347f023..e4f3b2b 100644 --- a/DIVI/src/compiler/compile.py +++ b/DIVI/src/compiler/compile.py @@ -142,6 +142,71 @@ def Mult(inc): new = inc Mult(new) break + + if '>' in cals[0]: + use = cals[0].split('>') + first = VARIABLE_VAL[VARIABLES.index(use[0])] + second = VARIABLE_VAL[VARIABLES.index(use[1])] + if first > second: + needed = inc[inc.index('if ' + str(smool[1])):inc.index(';')] + del needed[0] + Mult(needed) + inc[inc.index('if ' + str(smool[1])):inc.index(';')] = [''] + new = inc + Mult(new) + break + + if '<' in cals[0]: + use = cals[0].split('<') + first = VARIABLE_VAL[VARIABLES.index(use[0])] + second = VARIABLE_VAL[VARIABLES.index(use[1])] + if first < second: + needed = inc[inc.index('if ' + str(smool[1])):inc.index(';')] + del needed[0] + Mult(needed) + inc[inc.index('if ' + str(smool[1])):inc.index(';')] = [''] + new = inc + Mult(new) + break + + if '!=' in cals[0]: + use = cals[0].split('!=') + first = VARIABLE_VAL[VARIABLES.index(use[0])] + second = VARIABLE_VAL[VARIABLES.index(use[1])] + if first != second: + needed = inc[inc.index('if ' + str(smool[1])):inc.index(';')] + del needed[0] + Mult(needed) + inc[inc.index('if ' + str(smool[1])):inc.index(';')] = [''] + new = inc + Mult(new) + break + + if '>=' in cals[0]: + use = cals[0].split('==') + first = VARIABLE_VAL[VARIABLES.index(use[0])] + second = VARIABLE_VAL[VARIABLES.index(use[1])] + if first >= second: + needed = inc[inc.index('if ' + str(smool[1])):inc.index(';')] + del needed[0] + Mult(needed) + inc[inc.index('if ' + str(smool[1])):inc.index(';')] = [''] + new = inc + Mult(new) + break + + if '<=' in cals[0]: + use = cals[0].split('<=') + first = VARIABLE_VAL[VARIABLES.index(use[0])] + second = VARIABLE_VAL[VARIABLES.index(use[1])] + if first <= second: + needed = inc[inc.index('if ' + str(smool[1])):inc.index(';')] + del needed[0] + Mult(needed) + inc[inc.index('if ' + str(smool[1])):inc.index(';')] = [''] + new = inc + Mult(new) + break else: