doc: update README status

This commit is contained in:
mappu 2020-04-11 13:34:31 +12:00
parent f6362c4ebf
commit 4ed8bfd72d

View File

@ -15,12 +15,13 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv
- [X] Non-leaf function calls need to check + bubble errors
[X] Array handling
- [X] Infer whether to use slice/map for PHP array
[ ] Multi-file programs
- [ ] Include/Require
[-] Namespaces
- [X] Basic support for `namespace` -> package name transformation
- [ ] Resolve namespace names in calls
- [ ] Resolve `use` statements
[X] `if`
[X] `for`/`foreach`
[ ] `switch`
[ ] Generators
[ ] Numbered break/continue
[ ] Goto
@ -41,7 +42,7 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv
- Go doesn't support assignment in rvalues, only as a statement
- When walking below stmt level, need to first fully walk and check for any function calls + assignments that may need hoisting (and we can probably only do that correctly if there is no short-circuiting)
- [X] Add subtree walk + catch error for this case
[ ] Closures
[X] Closures
- [ ] Handle value/reference captures
[X] Convert top-level calls to `init()`/`main()`
- [X] Wrap in function
@ -69,6 +70,8 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv
### Productionize
[ ] Multi-file programs
- [ ] Include/Require
[ ] Infer whether to declare variable (`var` / `:=`) or reuse (`=`)
- [ ] Track current visibility scope
[ ] Comprehensive coverage of all AST node types
@ -76,6 +79,7 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv
- [ ] Node
- [ ] Stmt
- [ ] Expr
- [ ] Assign
- [X] Binary
- [ ] Scalar
- [ ] Heredocs/nowdocs
@ -91,6 +95,10 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv
[ ] Simple standard library transformations
- [X] common string/array functions
- [ ] More string/array functions
- Top 100 from https://www.exakat.io/top-100-php-functions/
- [ ] substr -> slice index operator (although that doesn't have the same reference semantics)
- [ ] error_reporting(E_ALL) --> just remove it
- [ ] ini_set('display_errors', 'On') --> remove it when the parameter is known
[ ] Elide error return for functions that cannot throw
- ?? Could be a standalone Go refactoring tool
@ -124,3 +132,8 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv
- The parser does have full positional information - exporting at the stmt level would be reasonable
- But the gofmt pass may lose this information
[ ] Command-line tool option to `go run`
## Reference
- [The Go Programming Language Specification](https://golang.org/ref/spec)