mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +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;
|
ZCC_VarName *vnode = (ZCC_VarName *)node;
|
||||||
out.Open("var-name");
|
out.Open("var-name");
|
||||||
out.AddName(vnode->Name);
|
out.AddName(vnode->Name);
|
||||||
|
PrintNodes(out, vnode->ArraySize);
|
||||||
out.Close();
|
out.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -611,12 +611,14 @@ variable_name(X) ::= IDENTIFIER(A).
|
||||||
{
|
{
|
||||||
NEW_AST_NODE(VarName,var);
|
NEW_AST_NODE(VarName,var);
|
||||||
var->Name = ENamedName(A.Int);
|
var->Name = ENamedName(A.Int);
|
||||||
|
var->ArraySize = NULL;
|
||||||
X = var;
|
X = var;
|
||||||
}
|
}
|
||||||
variable_name(X) ::= IDENTIFIER(A) array_size.
|
variable_name(X) ::= IDENTIFIER(A) array_size(B).
|
||||||
{
|
{
|
||||||
NEW_AST_NODE(VarName,var);
|
NEW_AST_NODE(VarName,var);
|
||||||
var->Name = ENamedName(A.Int);
|
var->Name = ENamedName(A.Int);
|
||||||
|
var->ArraySize = B;
|
||||||
X = var;
|
X = var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -307,6 +307,7 @@ struct ZCC_StateLine : ZCC_StatePart
|
||||||
struct ZCC_VarName : ZCC_TreeNode
|
struct ZCC_VarName : ZCC_TreeNode
|
||||||
{
|
{
|
||||||
ENamedName Name;
|
ENamedName Name;
|
||||||
|
ZCC_Expression *ArraySize; // NULL if not an array
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ZCC_Type : ZCC_TreeNode
|
struct ZCC_Type : ZCC_TreeNode
|
||||||
|
|
Loading…
Reference in a new issue