https://github.com/quintenmbusiness/phpastcodegenerationhelper
A PHP library for generating Abstract Syntax Tree (AST) nodes programmatically, simplifying code generation with nikic/php-parser.
https://github.com/quintenmbusiness/phpastcodegenerationhelper
ast code-generation development-tool generation nikic-php-parser php
Last synced: 9 months ago
JSON representation
A PHP library for generating Abstract Syntax Tree (AST) nodes programmatically, simplifying code generation with nikic/php-parser.
- Host: GitHub
- URL: https://github.com/quintenmbusiness/phpastcodegenerationhelper
- Owner: quintenmbusiness
- License: mit
- Created: 2024-11-26T18:48:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-15T00:55:30.000Z (over 1 year ago)
- Last Synced: 2024-12-15T01:32:05.937Z (over 1 year ago)
- Topics: ast, code-generation, development-tool, generation, nikic-php-parser, php
- Language: PHP
- Homepage: https://quintenmbusiness.github.io/PhpAstCodeGenerationHelper/
- Size: 750 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# PHP AST Code Generation Helper
[](https://packagist.org/packages/quintenmbusiness/php-ast-code-generation-helper)
[](https://packagist.org/packages/quintenmbusiness/php-ast-code-generation-helper)
[](https://github.com/quintenmbusiness/PhpAstCodeGenerationHelper/blob/master/LICENSE)
[](https://coveralls.io/github/quintenmbusiness/PhpAstCodeGenerationHelper)
---
### **Introduction**
`php-ast-code-generation-helper` is a utility package designed to simplify working with the abstract syntax trees (ASTs) generated by [nikic/php-parser](https://github.com/nikic/PHP-Parser). This package provides helper functions to streamline code generation, allowing developers to create PHP code programmatically with ease.
Whether you're building a code generation tool, refactoring engine, or educational AST visualization tool, this package has you covered!
---
## **Features**
- 🛠**Simplified AST Node Creation**: Generate PHP classes, methods, properties, and more using intuitive helper methods.
- 🚀 **Nikic PHP-Parser Integration**: Seamlessly integrates with the AST generated by `nikic/php-parser`.
- 📜 **Readable and Maintainable Code**: Focus on what to generate, not how to build the AST nodes.
- 🧩 **Customizable**: Extend and customize the helpers to suit your project requirements.
---
## **Installation**
Install the package via Composer:
```bash
composer require quintenmbusiness/php-ast-code-generation-helper
```
For development environments:
```bash
composer require --dev quintenmbusiness/php-ast-code-generation-helper
```
---
## **Usage**
For complete details and advanced examples, check out the [Wiki](https://github.com/quintenmbusiness/PhpAstCodeGenerationHelper/wiki/PHP-AST-Code-Generation-Helper-%E2%80%90-Wiki-Homepage).
---
## **Stats**
### Packagist Statistics
- **Total Downloads**: 
- **Monthly Downloads**: 
---
## **Contributing**
We welcome contributions! Please submit a pull request or open an issue for any bugs or features you'd like to see.
1. Fork the repository.
2. Create your feature branch: `git checkout -b feature/your-feature`.
3. Commit your changes: `git commit -am 'Add new feature'`.
4. Push to the branch: `git push origin feature/your-feature`.
5. Open a pull request.
---
## **Support**
If you find this package useful, consider supporting its development:
- [GitHub Sponsors](https://github.com/sponsors/quintenmbusiness)
---
## **Acknowledgments**
- Thanks to [nikic/php-parser](https://github.com/nikic/PHP-Parser) for the excellent AST parsing library.