Tale\Jade\Parser::__construct PHP Method

__construct() public method

The parser will run the provided input through the lexer and generate an AST out of it. The AST will be an object-tree consisting of \Tale\Jade\Parser\Node instances You can take the AST and either compile it with the Compiler or handle it yourself Possible options are: lexerOptions: The options for the lexer
public __construct ( array $options = null, Lexer $lexer = null )
$options array the options array
$lexer Lexer an existing lexer instance (lexer-option will be ignored)
    public function __construct(array $options = null, Lexer $lexer = null)
    {
        $this->defineOptions(['lexer_options' => []], $options);
        $this->lexer = $lexer ? $lexer : new Lexer($this->options['lexer_options']);
    }