Generate AST of a PHP source file

前端 未结 5 2011
梦毁少年i
梦毁少年i 2021-01-01 17:26

I want to parse a PHP source file, into an AST (preferably as a nested array of instructions).

I basically want to convert things like

f($a, $b + 1)
         


        
5条回答
  •  自闭症患者
    2021-01-01 17:38

    I have implemented a PHP Parser after I figured out that there was no existing parser. It parses the PHP code into a node tree.

提交回复
热议问题