mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Add the array size to ZCC_VarName
This commit is contained in:
parent
0d25ed8289
commit
67caf3303b
3 changed files with 5 additions and 1 deletions
|
@ -373,6 +373,7 @@ static void PrintVarName(FLispString &out, ZCC_TreeNode *node)
|
|||
ZCC_VarName *vnode = (ZCC_VarName *)node;
|
||||
out.Open("var-name");
|
||||
out.AddName(vnode->Name);
|
||||
PrintNodes(out, vnode->ArraySize);
|
||||
out.Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -611,12 +611,14 @@ variable_name(X) ::= IDENTIFIER(A).
|
|||
{
|
||||
NEW_AST_NODE(VarName,var);
|
||||
var->Name = ENamedName(A.Int);
|
||||
var->ArraySize = NULL;
|
||||
X = var;
|
||||
}
|
||||
variable_name(X) ::= IDENTIFIER(A) array_size.
|
||||
variable_name(X) ::= IDENTIFIER(A) array_size(B).
|
||||
{
|
||||
NEW_AST_NODE(VarName,var);
|
||||
var->Name = ENamedName(A.Int);
|
||||
var->ArraySize = B;
|
||||
X = var;
|
||||
}
|
||||
|
||||
|
|
|
@ -307,6 +307,7 @@ struct ZCC_StateLine : ZCC_StatePart
|
|||
struct ZCC_VarName : ZCC_TreeNode
|
||||
{
|
||||
ENamedName Name;
|
||||
ZCC_Expression *ArraySize; // NULL if not an array
|
||||
};
|
||||
|
||||
struct ZCC_Type : ZCC_TreeNode
|
||||
|
|
Loading…
Reference in a new issue