Php Language Features
This likely is not an exhaustive list & not necessarily everything here is handled by the PhpGrammar. Also, Docblocks are handled by their own grammar.
-
use NS\ClassName as ShortName
statements (maybe) -
use TraitName
statements- done
- interfaces
- traits
- docblocks
- description
- attributes in style
@tag some_tag
- name
- value (some_tag)
- attribute in style
@tag(some_tag) a description
- name
- value (some_tag)
- description
- The next expression/ast/thing.
- Currently, I'm using the
previous
mechanic to attach docblock to stuff. I don't really think there's a better way about this.
- Currently, I'm using the
- comments
- content
- attributes in both styles (see docblocks)
- The next expression/ast/thing, maybe???
- class (including anonymous classes)
- properties
- private/public/protected
- static/not-static
- name
- docblock
- default value
- constants
- private/public/protected
- static/not-static
- name
- docblock
- default value
- methods
- private/public/protected
- static/not-static
- name
- docblock
- arg list
- paramater names
- default values
- method body code
- properties
- functions
- name
- docblock
- arg list
- function body code
- HEREDOC - & discard it
- NOWDOC - & discard it
- string & discard it
- php8 attributes? Meh