1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Support for const expressions for bools & chars

This commit is contained in:
Brian Fiete 2021-12-31 06:17:57 -05:00
parent 2a98bf00d5
commit 28689853d2
6 changed files with 42 additions and 4 deletions

View file

@ -359,6 +359,11 @@ bool BfIRConstHolder::IsInt(BfTypeCode typeCode)
return (typeCode >= BfTypeCode_Int8) && (typeCode <= BfTypeCode_Char32);
}
bool BfIRConstHolder::IsChar(BfTypeCode typeCode)
{
return (typeCode >= BfTypeCode_Char8) && (typeCode <= BfTypeCode_Char32);
}
bool BfIRConstHolder::IsIntable(BfTypeCode typeCode)
{
return (typeCode >= BfTypeCode_Boolean) && (typeCode <= BfTypeCode_Char32);