- scriptified the scripted marines.

- fixed symbol name generation for native functions.
- moved PrintableName to VMFunction so that native functions also have this information.
This commit is contained in:
Christoph Oelckers 2016-11-21 19:09:58 +01:00
commit 360436c201
20 changed files with 658 additions and 756 deletions

View file

@ -787,11 +787,11 @@ type_list(X) ::= type_list(A) COMMA type_or_array(B). { X = A; /*X-overwrites-A*
type_list_or_void(X) ::= VOID. { X = NULL; }
type_list_or_void(X) ::= type_list(X).
array_size_expr(X) ::= LBRACKET opt_expr(A) RBRACKET.
array_size_expr(X) ::= LBRACKET(L) opt_expr(A) RBRACKET.
{
if (A == NULL)
{
NEW_AST_NODE(Expression,nil,A);
NEW_AST_NODE(Expression,nil,L.SourceLoc);
nil->Operation = PEX_Nil;
nil->Type = NULL;
X = nil;

View file

@ -2304,14 +2304,14 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
{
if (vindex == -1)
{
Error(p, "Attempt to override non-existent virtual function %s", FName(f->Name).GetChars());
Error(f, "Attempt to override non-existent virtual function %s", FName(f->Name).GetChars());
}
else
{
auto oldfunc = clstype->Virtuals[vindex];
if (oldfunc->Final)
{
Error(p, "Attempt to override final function %s", FName(f->Name).GetChars());
Error(f, "Attempt to override final function %s", FName(f->Name).GetChars());
}
clstype->Virtuals[vindex] = sym->Variants[0].Implementation;
sym->Variants[0].Implementation->VirtualIndex = vindex;