Re: [RFC] Shorter Attribute Syntax Change RFC 0.2

From: Date: Wed, 05 Aug 2020 03:40:55 +0000
Subject: Re: [RFC] Shorter Attribute Syntax Change RFC 0.2
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-111338@lists.php.net to get a copy of this message
Hi Theodore, > I meant to say "statement", e.g. > I suspect it is a statement and not an optional piece of data on a > statement, like say public. I assume this would boil down to a disagreement on what we mean by statement, and could be clarified by using whatever that definition was instead of "statement" or "declaration". For example, I might broadly mean that there are expressions, statements, and statement lists in PHP, and statements can be a certain list of node types composed of statements/expressions/nodes (plus standalone expressions), expressions can contain expressions or statement lists, but not statements. (and statement lists can contain 0 or more statements) (e.g. closures are expressions) - And then there are nodes that are parts of statements/expressions but neither statements nor expressions, such as parameter declarations - The php language specification is more complicated than that and my definition would inevitably be over-simplifying, the definition I'd meant was https://github.com/php/php-langspec/blob/master/spec/11-statements.md By statement, I'd be referring to what parsers generally categorize as statements. For example, the list of nodes in https://github.com/nikic/PHP-Parser/tree/master/lib/PhpParser/Node/Stmt - This has changed in the past, e.g. the "throw expression" RFC. - Still, I'd believe the attributes would be metadata associated with a class statement, a method/function statement, a parameter node, or a closure declaration expression Regards, - Tyson

« previous php.internals (#111338) next »