mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-14 22:41:53 +00:00
Accept only one identifier for class names.
This commit is contained in:
parent
2b96db5fac
commit
03c4244fd8
4 changed files with 5 additions and 5 deletions
|
@ -276,7 +276,7 @@ static void PrintClass(FLispString &out, ZCC_TreeNode *node)
|
|||
ZCC_Class *cnode = (ZCC_Class *)node;
|
||||
out.Break();
|
||||
out.Open("class");
|
||||
PrintNodes(out, cnode->ClassName);
|
||||
out.AddName(cnode->ClassName);
|
||||
PrintNodes(out, cnode->ParentName);
|
||||
PrintNodes(out, cnode->Replaces);
|
||||
out.AddHex(cnode->Flags);
|
||||
|
|
|
@ -158,10 +158,10 @@ class_definition(X) ::= class_head(A) class_body(B).
|
|||
X = A;
|
||||
}
|
||||
|
||||
class_head(X) ::= CLASS(T) dottable_id(A) class_ancestry(B) class_flags(C).
|
||||
class_head(X) ::= CLASS(T) IDENTIFIER(A) class_ancestry(B) class_flags(C).
|
||||
{
|
||||
NEW_AST_NODE(Class,head,T);
|
||||
head->ClassName = A;
|
||||
head->ClassName = A.Name();
|
||||
head->ParentName = B;
|
||||
head->Flags = C.Flags;
|
||||
head->Replaces = C.Replaces;
|
||||
|
|
|
@ -30,7 +30,7 @@ ZCCCompiler::ZCCCompiler(ZCC_AST &ast, DObject *_outer, PSymbolTable &_symbols)
|
|||
switch (node->NodeType)
|
||||
{
|
||||
case AST_Class:
|
||||
// if (AddNamedNode(static_cast<ZCC_Class *>(node)->ClassName, node))
|
||||
if (AddNamedNode(static_cast<ZCC_Class *>(node)->ClassName, node))
|
||||
{
|
||||
Classes.Push(static_cast<ZCC_Class *>(node));
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ struct ZCC_Identifier : ZCC_TreeNode
|
|||
|
||||
struct ZCC_Class : ZCC_TreeNode
|
||||
{
|
||||
ZCC_Identifier *ClassName;
|
||||
ENamedName ClassName;
|
||||
ZCC_Identifier *ParentName;
|
||||
ZCC_Identifier *Replaces;
|
||||
VM_UWORD Flags;
|
||||
|
|
Loading…
Reference in a new issue