php

Parser for PHP written in Go

  • 所有者: stephens2424/php
  • 平台:
  • 許可證: BSD 3-Clause "New" or "Revised" License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

php

Parser for PHP written in Go

See this post for an introduction.

Build Status GoDoc

Test console:

console

Project Status

This project is under heavy development, though some pieces are more or less stable. Listed here are components that in progress or are ideas for future development

Feature, Status
------------------------------, ------
Lexer and Parser, mostly complete. there are probably a few gaps still
Scoping, complete for simple cases. probably some gaps still, most notably that conditional definitions are treated as if they are always defined
Code search and symbol lookup, basic idea implemented, many many details missing
Code formatting, basic idea implemented, formatting needs to narrow down to PSR-2
Transpilation to Go, basic idea implemented, need follow through with more node types
Type inferencing, not begun
Dead code analysis, basic idea implemented, but only for some types of code. Also, this suffers from the same caveats as scoping

Project Components

Directory, Description
------------------------------, ------
php/ast, (abstract syntax tree) describes the nodes in PHP as parsed by the parser
php/ast/printer, prints an ast back to source code
php/cmd, a tool used to debug the parser
php/lexer, reads a stream of tokens from source code
php/parser, the core parser
php/passes, tools and packages related to modifying or analyzing PHP code (heavily a work in progress)
php/passes/togo, transpiler
php/passes/deadcode, dead code analyzer
php/query, tools and packages related to analyzing and finding things in PHP code (heavily a work in progress)
php/testdata, simple examples of PHP that must parse with no errors for tests to pass
php/token, describes the tokens read by the lexer

主要指標

概覽
名稱與所有者stephens2424/php
主編程語言Go
編程語言Go (語言數: 2)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2014-07-27 18:53:24
推送於2022-10-16 01:54:12
最后一次提交2022-10-15 21:54:11
發布數0
用户参与
星數527
關注者數38
派生數75
提交數439
已啟用問題?
問題數28
打開的問題數15
拉請求數10
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?