mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
36
IDEHelper/Compiler/BfConstResolver.h
Normal file
36
IDEHelper/Compiler/BfConstResolver.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include "BeefySysLib/Common.h"
|
||||
#include "BfAst.h"
|
||||
#include "BfSystem.h"
|
||||
#include "BfCompiler.h"
|
||||
#include "BfExprEvaluator.h"
|
||||
|
||||
NS_BF_BEGIN
|
||||
|
||||
class BfModule;
|
||||
class BfMethodMatcher;
|
||||
|
||||
enum BfConstResolveFlags
|
||||
{
|
||||
BfConstResolveFlag_None = 0,
|
||||
BfConstResolveFlag_ExplicitCast = 1,
|
||||
BfConstResolveFlag_NoCast = 2,
|
||||
BfConstResolveFlag_AllowSoftFail = 4,
|
||||
};
|
||||
|
||||
class BfConstResolver : public BfExprEvaluator
|
||||
{
|
||||
public:
|
||||
bool mIsInvalidConstExpr;
|
||||
bool mAllowGenericConstValue;
|
||||
|
||||
public:
|
||||
virtual bool CheckAllowValue(const BfTypedValue& typedValue, BfAstNode* refNode) override;
|
||||
|
||||
public:
|
||||
BfConstResolver(BfModule* bfModule);
|
||||
|
||||
BfTypedValue Resolve(BfExpression* expr, BfType* wantType = NULL, BfConstResolveFlags flags = BfConstResolveFlag_None);
|
||||
bool PrepareMethodArguments(BfAstNode* targetSrc, BfMethodMatcher* methodMatcher, Array<BfIRValue>& llvmArgs);
|
||||
};
|
||||
|
||||
NS_BF_END
|
Loading…
Add table
Add a link
Reference in a new issue