Merge branch 'master' into dev
This commit is contained in:
commit
386eb124df
67
README.md
67
README.md
@ -23,39 +23,14 @@ Features:
|
|||||||
- Parsing syntax-invalid PHP files
|
- Parsing syntax-invalid PHP files
|
||||||
- Saving and printing free-floating comments and whitespaces
|
- Saving and printing free-floating comments and whitespaces
|
||||||
|
|
||||||
Roadmap
|
Who Uses
|
||||||
-------
|
--------
|
||||||
|
|
||||||
- Control Flow Graph (CFG)
|
[VKCOM/noverify](https://github.com/VKCOM/noverify) - NoVerify is a pretty fast linter for PHP
|
||||||
- PhpDocComment parser
|
|
||||||
- Stabilize api
|
|
||||||
|
|
||||||
Install
|
[quasilyte/phpgrep](https://github.com/quasilyte/phpgrep) - phpgrep is a tool for syntax-aware PHP code search
|
||||||
-------
|
|
||||||
|
|
||||||
```
|
Usage example
|
||||||
go get github.com/z7zmey/php-parser
|
|
||||||
```
|
|
||||||
|
|
||||||
CLI
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
php-parser [flags] <path> ...
|
|
||||||
```
|
|
||||||
|
|
||||||
| flag | type | description |
|
|
||||||
|-------|------|----------------------------------------------|
|
|
||||||
| -p | bool | print filepath |
|
|
||||||
| -d |string| dump format: [custom, go, json, pretty-json] |
|
|
||||||
| -r | bool | resolve names |
|
|
||||||
| -ff | bool | parse and show free floating strings |
|
|
||||||
| -prof |string| start profiler: [cpu, mem, trace] |
|
|
||||||
| -php5 | bool | parse as PHP5 |
|
|
||||||
|
|
||||||
Dump AST to stdout.
|
|
||||||
|
|
||||||
Example
|
|
||||||
-------
|
-------
|
||||||
|
|
||||||
```Golang
|
```Golang
|
||||||
@ -89,6 +64,38 @@ func main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Roadmap
|
||||||
|
-------
|
||||||
|
|
||||||
|
- Control Flow Graph (CFG)
|
||||||
|
- PhpDocComment parser
|
||||||
|
- Stabilize api
|
||||||
|
|
||||||
|
Install
|
||||||
|
-------
|
||||||
|
|
||||||
|
```
|
||||||
|
go get github.com/z7zmey/php-parser
|
||||||
|
```
|
||||||
|
|
||||||
|
CLI
|
||||||
|
---
|
||||||
|
|
||||||
|
```
|
||||||
|
php-parser [flags] <path> ...
|
||||||
|
```
|
||||||
|
|
||||||
|
| flag | type | description |
|
||||||
|
|-------|------|----------------------------------------------|
|
||||||
|
| -p | bool | print filepath |
|
||||||
|
| -d |string| dump format: [custom, go, json, pretty-json] |
|
||||||
|
| -r | bool | resolve names |
|
||||||
|
| -ff | bool | parse and show free floating strings |
|
||||||
|
| -prof |string| start profiler: [cpu, mem, trace] |
|
||||||
|
| -php5 | bool | parse as PHP5 |
|
||||||
|
|
||||||
|
Dump AST to stdout.
|
||||||
|
|
||||||
Namespace resolver
|
Namespace resolver
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user