Skip to content

How to turn ast into PHP code #969

@Yuri2

Description

@Yuri2

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions