From 4d333fc29751fcc60f73d13d7dc16d0666aa55f6 Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 15 Apr 2020 19:08:24 +1200 Subject: [PATCH] doc: update status in README --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d68f467..9c5e78c 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,8 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv - [ ] Resolve `use` statements [X] `if` [X] `for`/`foreach` -[ ] `switch` +[X] `switch` [ ] Generators -[ ] Numbered break/continue [ ] Goto [X] `null` -> `nil` [X] Consts and `define()` @@ -37,7 +36,11 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv - [ ] `finally` - Runs before any return statement inside the try block or catch block; also runs after the try block is complete - Maybe `finally` would be more concisely implemented as defer inside an IIFE, but that is not idiomatic, maintainable Go code -[ ] Abandon upon sight of `eval` / `extract` / variable-variables ... +[X] Abandon upon sight of highly dynamic constructs + - [X] `eval` + - [X] `extract` + - [ ] variable-variables + - [ ] Attempts to enable magic_quotes or register_globals [X] Detect assignment expressions - 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) @@ -81,8 +84,9 @@ The goal is to produce idiomatic, maintainable Go code as part of a one-off conv - [ ] Expr - [ ] Assign - [X] Binary - - [ ] Scalar - - [ ] Heredocs/nowdocs + - [X] Scalar + - [X] Heredocs/nowdocs +[ ] Numbered break/continue [ ] Type inference - [ ] Type declarations for literals (string, slice/map with constant initializer, etc) - [ ] Convert known PHP typenames to Go equivalents @@ -95,8 +99,9 @@ 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) + - [ ] Top 100 from https://www.exakat.io/top-100-php-functions/ + - [ ] substr -> slice index operator + - This has the same value semantics for string literals, but not variables - [ ] 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