Skip to content

Commit

Permalink
Add operators <= and >= for version comparisons (codegen)
Browse files Browse the repository at this point in the history
  • Loading branch information
NUCLEAR-BOMB committed Nov 18, 2024
1 parent 7358d01 commit 76691fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/codegen/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ def find_condition_version(cond):
def check_version(specified_version, version):
if len(version) == 0:
return True
elif version[:2] == '<=':
return specified_version <= parse_compiler_version(version[2:])
elif version[:2] == '>=':
return specified_version >= parse_compiler_version(version[2:])
elif version[0] == '<':
return specified_version < parse_compiler_version(version[1:])
elif version[0] == '>':
Expand Down

0 comments on commit 76691fa

Please sign in to comment.