phug / parser
Pug (ex-Jade) parser for PHP, HTML template engine structured by indentation
2.0.1
2026-03-15 18:02 UTC
Requires
- php: >=5.5.0
- phug/ast: ^0.1.0 || ^1.0 || ^2.0
- phug/lexer: ^0.5.6 || ^1.0 || ^2.0
- phug/util: ^1.6 || ^2.0
This package is auto-updated.
Last update: 2026-05-17 22:20:33 UTC
README
What is Phug Parser?
The Phug parser utilizes the Phug lexer and parses the tokens it generates into an AST
Installation
Install via Composer
composer require phug/parser
Usage
$parser = new Phug\Parser($options); $root = $parser->parse($pugInput); //$root is now a Phug\Parser\Node\DocumentNode element