- converted a few more DECORATE files.

- started with the AST converter. So far it only deals with direct function calls with simple constants as parameters.
- added an error condition for the defaults block to get rid of some asserts.
This commit is contained in:
Christoph Oelckers 2016-10-14 00:40:20 +02:00
commit 7de683f9f5
18 changed files with 881 additions and 681 deletions

View file

@ -3622,12 +3622,19 @@ FxFunctionCall::~FxFunctionCall()
//==========================================================================
//
//
// Note: This currently only deals with the simple cases and needs some changes.
//
//==========================================================================
FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx)
{
// This part is mostly a kludge, it really needs to get the class type from Self.
PFunction *afd = dyn_cast<PFunction>(ctx.Class->Symbols.FindSymbol(MethodName, true));
if (afd != nullptr)
{
return new FxVMFunctionCall(afd, ArgList, ScriptPosition, false);
}
for (size_t i = 0; i < countof(FxFlops); ++i)
{
if (MethodName == FxFlops[i].Name)