aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-26 10:12:02 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-26 10:12:02 +0900
commita483ec026792d8c635bbbe0adb2a502dec9a7940 (patch)
treef58b1ea5bffa202492f11aea00cd4eb98cf8cf1c
parent49599e55caf178ff92b8ac6c34daf60f723ecf9b (diff)
downloadkati-a483ec026792d8c635bbbe0adb2a502dec9a7940.tar.gz
unexport LookupVarInCurrentScope
-rw-r--r--ast.go4
-rw-r--r--eval.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/ast.go b/ast.go
index 17ad01a..65d40e1 100644
--- a/ast.go
+++ b/ast.go
@@ -66,13 +66,13 @@ func (ast *assignAST) evalRHS(ev *Evaluator, lhs string) Var {
case "=":
return &recursiveVar{expr: ast.rhs, origin: origin}
case "+=":
- prev := ev.LookupVarInCurrentScope(lhs)
+ prev := ev.lookupVarInCurrentScope(lhs)
if !prev.IsDefined() {
return &recursiveVar{expr: ast.rhs, origin: origin}
}
return prev.AppendVar(ev, ast.rhs)
case "?=":
- prev := ev.LookupVarInCurrentScope(lhs)
+ prev := ev.lookupVarInCurrentScope(lhs)
if prev.IsDefined() {
return prev
}
diff --git a/eval.go b/eval.go
index 2bfaa46..a72e612 100644
--- a/eval.go
+++ b/eval.go
@@ -310,7 +310,7 @@ func (ev *Evaluator) LookupVar(name string) Var {
return ev.vars.Lookup(name)
}
-func (ev *Evaluator) LookupVarInCurrentScope(name string) Var {
+func (ev *Evaluator) lookupVarInCurrentScope(name string) Var {
if ev.currentScope != nil {
v := ev.currentScope.Lookup(name)
return v