【文件属性】:
文件名称:ast:XP框架的AST
文件大小:83KB
文件格式:ZIP
更新时间:2021-04-18 23:58:04
php compiler php7 metaprogramming ast
XP AST
用于抽象语法树库。
例子
use lang\ast\{ Language , Tokens };
$ tree = Language :: named ( 'PHP' )-> parse ( new Tokens ( 'echo PHP_VERSION;' ))-> tree ();
// lang.ast.ParseTree(source: (string))@{
// scope => lang.ast.Scope {
// parent => null
// package => null
// imports => []
// types => []
// }
// children => [lang.ast.nodes.EchoStatement {
// kind => "echo"
// expres