summaryrefslogtreecommitdiff
path: root/Zend/zend_language_parser.y
diff options
context:
space:
mode:
authorTheodore Brown <theodorejb@outlook.com>2020-07-02 09:56:21 -0600
committerNikita Popov <nikita.ppv@gmail.com>2020-07-28 15:28:57 +0200
commit470d1696d9a4057ab72b90941556f78990f61692 (patch)
tree30dc7f275ad3749fe3aff5bc862bc3b67f016e8f /Zend/zend_language_parser.y
parent44ad2db15fe786b07ce793624885e0c43e0af897 (diff)
downloadphp-git-470d1696d9a4057ab72b90941556f78990f61692.tar.gz
Implement Shorter Attribute Syntax
RFC: https://wiki.php.net/rfc/shorter_attribute_syntax Closes GH-5796. Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
Diffstat (limited to 'Zend/zend_language_parser.y')
-rw-r--r--Zend/zend_language_parser.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index f8b4b6d862..55f2c0f49c 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -178,6 +178,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
%token <ident> T_NS_C "'__NAMESPACE__'"
%token END 0 "end of file"
+%token T_ATTRIBUTE "'@@'"
%token T_PLUS_EQUAL "'+='"
%token T_MINUS_EQUAL "'-='"
%token T_MUL_EQUAL "'*='"
@@ -345,7 +346,7 @@ attribute_decl:
;
attribute:
- T_SL attribute_decl T_SR { $$ = $2; }
+ T_ATTRIBUTE attribute_decl { $$ = $2; }
;
attributes: