@@ -160,7 +160,7 @@ public data Op(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", loc scop
160160 ;
161161
162162public data Param (loc at =|unknown:///| , loc decl =|unknown:///| , str id ="" , loc scope =|unknown:///| , str phpdoc ="" )
163- = param (str paramName , OptionExpr paramDefault ,bool byRef ,bool isVariadic , PHPType paramType , set [Modifier ] modifiers , list [AttributeGroup ] attributeGroups );
163+ = param (str paramName , OptionExpr paramDefault ,bool byRef ,bool isVariadic , PHPType paramType , set [Modifier ] modifiers , list [AttributeGroup ] attributeGroups , list [ PropertyHook ] propertyHooks );
164164
165165public data Scalar (loc at =|unknown:///| , loc decl =|unknown:///| , str id ="" , loc scope =|unknown:///| , str phpdoc ="" , str actualValue ="" )
166166 = classConstant ()
@@ -169,6 +169,7 @@ public data Scalar(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", loc
169169 | funcConstant ()
170170 | lineConstant ()
171171 | methodConstant ()
172+ | propertyConstant ()
172173 | namespaceConstant ()
173174 | traitConstant ()
174175 | float (real realVal )
@@ -180,7 +181,7 @@ public data Scalar(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", loc
180181public data Stmt (loc at =|unknown:///| , loc decl =|unknown:///| , str id ="" , loc scope =|unknown:///| , str phpdoc ="" )
181182 = \break (OptionExpr breakExpr )
182183 | classDef (ClassDef classDef )
183- | const (list [Const ] consts )
184+ | const (list [Const ] consts , list [ AttributeGroup ] attributeGroups )
184185 | \continue (OptionExpr continueExpr )
185186 | declare (list [Declaration ] decls , list [Stmt ] body )
186187 | do (Expr cond , list [Stmt ] body )
@@ -202,7 +203,6 @@ public data Stmt(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", loc sc
202203 | \return (OptionExpr returnExpr )
203204 | static (list [StaticVar ] vars )
204205 | \switch (Expr cond , list [Case ] cases )
205- // | \throw(Expr expr) NOW AN EXPRESSION
206206 | tryCatch (list [Stmt ] body , list [Catch ] catches )
207207 | tryCatchFinally (list [Stmt ] body , list [Catch ] catches , list [Stmt ] finallyBody )
208208 | unset (list [Expr ] unsetVars )
@@ -238,8 +238,8 @@ public data Use(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", loc sco
238238 = use (Name importName , OptionName asName , UseType useType );
239239
240240public data ClassItem (loc at =|unknown:///| , loc decl =|unknown:///| , str id ="" , loc scope =|unknown:///| , str phpdoc ="" )
241- = property (set [Modifier ] modifiers , list [Property ] prop , PHPType propType , list [AttributeGroup ] attributeGroups )
242- | classConst (list [Const ] consts , set [Modifier ] modifiers , list [AttributeGroup ] attributeGroups )
241+ = property (set [Modifier ] modifiers , list [Property ] prop , PHPType propType , list [AttributeGroup ] attributeGroups , list [ PropertyHook ] propertyHooks )
242+ | classConst (list [Const ] consts , set [Modifier ] modifiers , list [AttributeGroup ] attributeGroups , PHPType constType )
243243 | method (str name , set [Modifier ] modifiers , bool byRef , list [Param ] params , list [Stmt ] body , PHPType returnType , list [AttributeGroup ] attributeGroups )
244244 | traitUse (list [Name ] traits , list [Adaptation ] adaptations )
245245 | enumCase (str caseName , OptionExpr caseExpr , list [AttributeGroup ] attributeGroups )
@@ -253,6 +253,11 @@ public data Adaptation
253253public data Property (loc at =|unknown:///| , loc decl =|unknown:///| , str id ="" , loc scope =|unknown:///| , str phpdoc ="" )
254254 = property (str propertyName , OptionExpr defaultValue );
255255
256+ public data PropertyHook (loc at =|unknown:///| , loc decl =|unknown:///| )
257+ = propertyHookExpr (str name , set [Modifier ] modifiers , bool byRef , list [Param ] params , Expr exprBody , list [AttributeGroup ] attributeGroups )
258+ | propertyHookStmts (str name , set [Modifier ] modifiers , bool byRef , list [Param ] params , list [Stmt ] body , list [AttributeGroup ] attributeGroups )
259+ ;
260+
256261public data Modifier (loc at =|unknown:///| , loc decl =|unknown:///| , str id ="" , loc scope =|unknown:///| , str phpdoc ="" )
257262 = \public ()
258263 | \private ()
@@ -261,6 +266,10 @@ public data Modifier(loc at=|unknown:///|, loc decl=|unknown:///|, str id="", lo
261266 | abstract ()
262267 | final ()
263268 | readonly ()
269+ | publicSet ()
270+ | privateSet ()
271+ | protectedSet ()
272+ | magic ()
264273 ;
265274
266275public data ClassDef (loc at =|unknown:///| , loc decl =|unknown:///| , str id ="" , loc scope =|unknown:///| , str phpdoc ="" )
0 commit comments