Skip to content

Commit

Permalink
Const: Add is_int property.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltfish committed Jan 24, 2025
1 parent 013448a commit 0120e38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ailment/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def sign_bit(self):
def copy(self) -> Const:
return Const(self.idx, self.variable, self.value, self.bits, **self.tags)

@property
def is_int(self) -> bool:
return isinstance(self.value, int)


class Tmp(Atom):
__slots__ = ("tmp_idx",)
Expand Down

0 comments on commit 0120e38

Please sign in to comment.