Mercurial > archived > louis > epitech > mq > rathaxes
view rathaxes_compiler_passes_fix_local_variable_resolution_on_method_call.patch @ 137:8bbdb488f6fe
Wip, cleaning up the probe function
author | Louis Opter <kalessin@kalessin.fr> |
---|---|
date | Sat, 18 Jan 2014 17:52:33 -0800 |
parents | 6e142648b2fe |
children |
line wrap: on
line source
# HG changeset patch # Parent 1b62d6a6307fbfe6ad9ae7137d189f48b7ceb1fb rathaxes: fix resolution of local variables on method call Fix ${local.skb.init()} crazyness. diff --git a/rathaxes/compiler/passes/common/rtxResolve.inc.cws b/rathaxes/compiler/passes/common/rtxResolve.inc.cws --- a/rathaxes/compiler/passes/common/rtxResolve.inc.cws +++ b/rathaxes/compiler/passes/common/rtxResolve.inc.cws @@ -388,7 +388,20 @@ // Argument comes from the Chunk, so we retrieve the *real* type // That will be resolved after the "local" resolution. - rtxResolve_BuildLocalSelf(subResVal, theChunk, placeHolder, subidentifiers); + if (subidentifiers#front == "local") + rtxResolve_BuildLocalSelf(subResVal, theChunk, placeHolder, subidentifiers); + else + { + local src_arg; + local src_type; + local src_value; + rtxNodeArgs_GetArgByName(src_resVals, "self", src_arg); + if (rtxNodeArg_getRType(src_arg, src_type) == false) + return false; + if (rtxNodeArg_getValue(src_arg, src_value) == false) + return false; + rtxNodeArgs_AppendArg(subResVal, "self", src_type, src_value); + } local local_self; rtxNodeArgs_GetArgByName(subResVal, "self", local_self); local local_type;