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

Improved circular mixin check, isconst(expr), [ConstSkip]

This commit is contained in:
Brian Fiete 2022-05-30 11:40:49 -07:00
parent cab9b3d9c7
commit 75333a0928
19 changed files with 241 additions and 60 deletions

View file

@ -1718,7 +1718,7 @@ void BfAutoComplete::CheckIdentifier(BfAstNode* identifierNode, bool isInExpress
{
"alignof", "as", "asm", "base", "break", "case", "catch", "checked", "continue", "default", "defer",
"delegate", "delete", "do", "else", "false", "finally",
"fixed", "for", "function", "if", "implicit", "in", "internal", "is", "new", "mixin", "null",
"fixed", "for", "function", "if", "implicit", "in", "internal", "is", "isconst", "new", "mixin", "null",
"offsetof", "out", "params", "ref", "rettype", "return",
"sealed", "sizeof", "scope", "static", "strideof", "struct", "switch", /*"this",*/ "try", "true", "typeof", "unchecked",
"using", "var", "virtual", "volatile", "where", "while",
@ -3570,6 +3570,8 @@ String BfAutoComplete::ConstantToString(BfIRConstHolder* constHolder, BfIRValue
auto constant = constHolder->GetConstant(id);
switch (constant->mTypeCode)
{
case BfTypeCode_Boolean:
return StrFormat(":(bool) %s", constant->mBool ? "true" : "false");
case BfTypeCode_UInt8:
return StrFormat(":(uint8) %llu", constant->mUInt64);
case BfTypeCode_UInt16: