Skip to content

Compatability with php-parser 3.0 #17

@nekosaur

Description

@nekosaur

It looks like there are some breaking changes in the coming php-parser 3.0 that results in php-unparser being unable to use its output to unparse. Specifically I had problems with simple string arrays.

<?

return [
  "xzczxc",
  "qweqweqwe"
];
Node: xzczxc
Node kind: undefined
{ Error: Bad AST structure
    at CodeGen.process (/home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/index.js:42:13)
    at /home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/array.js:11:19
    at Array.map (<anonymous>)
    at CodeGen.module.exports [as array] (/home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/array.js:19:25)
    at CodeGen.process (/home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/index.js:32:31)
    at /home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/array.js:11:19
    at Array.map (<anonymous>)
    at CodeGen.module.exports [as array] (/home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/array.js:19:25)
    at CodeGen.process (/home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/index.js:32:31)
    at CodeGen.module.exports [as return] (/home/vagrant/apps/translation-scripts/node_modules/php-unparser/node_translators/return.js:12:22) node: 'xzczxc' }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions