Skip to content

chris-l/php-unparser

Repository files navigation

php-unparser

Build Status Coverage Status

This project is a JavaScript based unparser for the AST produced by glayzzle's php-parser.

It aims to produce code that uses the style format recommended by PSR-1 and PSR-2.

It's at an early development stage, but it is already able to generate code for most of the produced AST. It has no dependencies.

How to use

var unparse = require('php-unparser'); var ast = ["program",[["sys","echo",[["string","hello world"]]]]]; console.log(unparse(ast)); // Will output -> echo "hello world";

Demo

See it working

License

MIT License, Copyright 2016 Christopher Luna

About

A JavaScript based code generator, to unparse glayzzle/php-parser compatible AST back to code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6