Skip to content

v0.9.3

Choose a tag to compare

@jorgsowa jorgsowa released this 26 Apr 02:08
· 305 commits to main since this release
afa378a

Added

  • `doc_comment: Option<Comment<'src>>` field on `ConstItem` — top-level constants now carry their preceding doc comment in the AST. In multi-constant declarations (`const A = 1, B = 2;`) the doc comment is attached to the first item only, mirroring the existing `pending_attrs` pattern (`php-ast`, `php-rs-parser`, #277).

Fixed

  • Printer emitted attributes on `const` statements after the `const` keyword (invalid PHP); both doc comments and attributes are now printed before `const` (`php-printer`, #277).