add paramref for fast path for param access (e.g. $1, $(1))
still set "1" in Vars, for access like
n := 1
v := $($(n))
fix to set $0 to variable name in $(call )
after:
% ./run_integration_test.rb android
Running make for android... 5.62 secs
Running kati for android... 10.89 secs
android: OK
PASS!
diff --git a/expr_test.go b/expr_test.go
index d12e48d..acb51c0 100644
--- a/expr_test.go
+++ b/expr_test.go
@@ -236,6 +236,28 @@
},
},
},
+ {
+ in: `$(strip $1)`,
+ val: &funcStrip{
+ fclosure: fclosure{
+ args: []Value{
+ literal("(strip"),
+ paramref(1),
+ },
+ },
+ },
+ },
+ {
+ in: `$(strip $(1))`,
+ val: &funcStrip{
+ fclosure: fclosure{
+ args: []Value{
+ literal("(strip"),
+ paramref(1),
+ },
+ },
+ },
+ },
} {
val, _, err := parseExpr([]byte(tc.in), nil)
if tc.isErr {