<p><a href="https://github.com/z7zmey/php-parser">https://github.com/z7zmey/php-parser</a> was covered by the tests.</p>
<p>I separated alternative syntax nodes for 'while', 'for', 'foreach', and 'switch'</p>
<p>Traverser, lexer, PHP5 and PHP7 parsing rules were fully covered by tests.</p>
<hr/>**评论:**<br/><br/>SeerUD: <pre><p>What are you, or do you plan on using this for? Or is it more for learning purposes? Either way, pretty cool!</p></pre>z7zmey: <pre><p>Thank you, I going to use it for my other project that visualizes UML and call graph based on PHP sources.
I have prototype written in go that uses <a href="https://github.com/nikic/PHP-Parser" rel="nofollow">https://github.com/nikic/PHP-Parser</a> and <a href="https://github.com/ircmaxell/php-cfg" rel="nofollow">https://github.com/ircmaxell/php-cfg</a> and requires PHP to be installed in OS. I need the same written in go. My next goal is to build Code Flow Graph based on AST, after that, I will be able to replace PHP libraries in the project.</p></pre>PaluMacil: <pre><p>I think I remember the author stating that it's for quality linting or something like that. I don't believe the author intends to write a PHP interpreter which would be a lot of fun (hey, PHP might not be anyone's favorite, but lexing, parsing, and building syntax trees is awesome)!</p></pre>firstrow2: <pre><p>thanks for your job. I'm not satisfied with autocomplete and good static analysis support for php for vim/emacs so your project may be a good entry point for me to write my own lsp server for php in golang.</p></pre>z7zmey: <pre><p>It is great, but I think for it you need some features that I am only planning to implement:</p>
<ul>
<li><p>PhpDocComment parser for additional information about variable types</p></li>
<li><p>Namespace resolver</p></li>
<li><p>Static single assignment and Code Flow Graph</p></li>
</ul></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传