From 4a295dfa3ddcc1464cc83d34c34f0495e41fcdb3 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 11 Mar 2016 20:41:45 -0600 Subject: [PATCH] Accept constant definitions in structs. - We already need to handle them for enums, so there's really nothing to be gained by not accepting constant definitions directly. --- src/zscript/zcc-parse.lemon | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zscript/zcc-parse.lemon b/src/zscript/zcc-parse.lemon index 3d0e40121..c42e0818b 100644 --- a/src/zscript/zcc-parse.lemon +++ b/src/zscript/zcc-parse.lemon @@ -262,6 +262,7 @@ struct_body(X) ::= struct_member(A) struct_body(B). { X = A; A->AppendSibling(B struct_member(X) ::= declarator_no_fun(A). { X = A; } struct_member(X) ::= enum_def(A). { X = A; } +struct_member(X) ::= const_def(A). { X = A; } /*----- Constant Definition ------*/ /* Like UnrealScript, a constant's type is implied by its value's type. */