phug/parser

Pug (ex-Jade) parser for PHP, HTML template engine structured by indentation

0.5.8 2017-12-21 16:58 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