glayzzle / glayzzle/php-parser

How to turn ast into PHP code

Open
#969 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
565
Forks
75
PR merge metrics
No merged PRs in 30d

Description

const parser = new engine({
// some options :
parser: {
extractDoc: true,
php7: true,
},
ast: {
withPositions: true,
},
});

// Load a static file (Note: this file should exist on your computer)
const phpcode = fs.readFileSync("./1.php", {
encoding: "utf-8"
});

let ast=parser.parseCode(phpcode);

----------------------
now:
How to turn ast into PHP code?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.