commit | e1b813c3e9cd518aba45645055816278c3e61eca | [log] [tgz] |
---|---|---|
author | Fumitoshi Ukai <fumitoshi.ukai@gmail.com> | Mon Mar 30 18:38:21 2015 +0900 |
committer | Fumitoshi Ukai <fumitoshi.ukai@gmail.com> | Mon Mar 30 18:38:21 2015 +0900 |
tree | b907e64664892006b1dc8312e853949ab85212cc | |
parent | 51d53d9d969431f621f50b666af9069f0049348e [diff] [blame] |
refactor assign ast.
diff --git a/eval.go b/eval.go index 590a7ae..42aa35a 100644 --- a/eval.go +++ b/eval.go
@@ -133,15 +133,7 @@ ev.lineno = ast.lineno lhs := ev.evalExpr(ast.lhs) - var rhs string - switch ast.assign_type { - case ASSIGN_SIMPLE: - rhs = ev.evalExpr(ast.rhs) - case ASSIGN_RECURSIVE: - rhs = ast.rhs - default: - panic("TODO") - } + rhs := ast.evalRHS(ev) Log("ASSIGN: %s=%s", lhs, rhs) ev.outVars[lhs] = rhs }