Translate copy-files, add_soong_config_namespace and add_soong_config_var_value macros

Bug: 194521362
Test: internal

Change-Id: I88fb62f057476d96dfb056813a900e8497e7bbb9
This commit is contained in:
Sasha Smundak
2021-07-26 18:42:25 -07:00
parent 596a78949c
commit 3deb968aef
4 changed files with 219 additions and 50 deletions

View File

@@ -516,6 +516,7 @@ func (cx *callExpr) eval(valueMap map[string]starlarkExpr) (res starlarkExpr, sa
}
func (cx *callExpr) emit(gctx *generationContext) {
sep := ""
if cx.object != nil {
gctx.write("(")
cx.object.emit(gctx)
@@ -530,8 +531,14 @@ func (cx *callExpr) emit(gctx *generationContext) {
panic(fmt.Errorf("callExpr for %q should not be there", cx.name))
}
gctx.write(kf.runtimeName, "(")
if kf.hiddenArg == hiddenArgGlobal {
gctx.write("g")
sep = ", "
} else if kf.hiddenArg == hiddenArgConfig {
gctx.write("cfg")
sep = ", "
}
}
sep := ""
for _, arg := range cx.args {
gctx.write(sep)
arg.emit(gctx)