phpdoc-parser 0.24.1

Structural PHPDoc parser. Parses doc-comment blocks into a tag/prose AST with accurate spans; tag bodies exposed as raw text.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# phpdoc-parser

Structural PHPDoc parser. Turns `/** ... */` blocks into a summary, description and tag list with accurate spans. Tag-agnostic: tag bodies are exposed as raw text so you can apply your own type parsers.

```rust
use phpdoc_parser::{body_text, find_tags, parse};

let doc = parse("/** @param int $x The value */");
for param in find_tags(&doc, "param") {
    println!("{}", body_text(param.body.as_ref()).unwrap_or_default());
}
```

Part of the [rust-php-parser](https://github.com/jorgsowa/rust-php-parser) workspace. API reference: [docs.rs/phpdoc-parser](https://docs.rs/phpdoc-parser).

## License

BSD 3-Clause