- implemented class member access for variables. (Struct members and functions not done yet.)
This commit is contained in:
parent
f5e4c4b109
commit
5bed0a2b39
5 changed files with 153 additions and 36 deletions
|
|
@ -2372,13 +2372,7 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
|
|||
// The function name is a simple identifier.
|
||||
return new FxFunctionCall(static_cast<ZCC_ExprID *>(fcall->Function)->Identifier, NAME_None, ConvertNodeList(fcall->Parameters), *ast);
|
||||
|
||||
// not yet done
|
||||
case AST_ExprTypeRef:
|
||||
case AST_SwitchStmt:
|
||||
case AST_CaseStmt:
|
||||
case AST_ExprMemberAccess:
|
||||
// calling a class member through its pointer
|
||||
// todo.
|
||||
break;
|
||||
|
||||
case AST_ExprBinary:
|
||||
|
|
@ -2400,6 +2394,12 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
|
|||
break;
|
||||
}
|
||||
|
||||
case AST_ExprMemberAccess:
|
||||
{
|
||||
auto memaccess = static_cast<ZCC_ExprMemberAccess *>(ast);
|
||||
return new FxMemberIdentifier(ConvertNode(memaccess->Left), memaccess->Right, *ast);
|
||||
}
|
||||
|
||||
case AST_FuncParm:
|
||||
{
|
||||
auto fparm = static_cast<ZCC_FuncParm *>(ast);
|
||||
|
|
@ -2660,6 +2660,11 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
|
|||
}
|
||||
}
|
||||
|
||||
// not yet done
|
||||
case AST_SwitchStmt:
|
||||
case AST_CaseStmt:
|
||||
break;
|
||||
|
||||
|
||||
case AST_CompoundStmt:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue