Mercurial > archived > louis > epitech > mq > rathaxes
view rathaxes_compiler_passes_fix_placeholder_identification.patch @ 127:72b5b4a62cc5
Wip on fixing ref/scalar issues, partly fixed
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Sun, 18 Aug 2013 15:33:24 -0700 |
parents | 2a7126613c70 |
children |
line wrap: on
line source
# HG changeset patch # User David Pineau <dav.pineau@gmail.com> # Parent 8ffd7987f711493f9c87e029ba0977f5126e6120 rathaxes: fix a misuse of the unknown list in the placeholder identification pass Fixes "unknown" C types being incorrectly expanded to numbers. diff --git a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws --- a/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws +++ b/rathaxes/compiler/passes/back/rtxPlaceHolders.inc.cws @@ -194,7 +194,9 @@ // in unstrict mode if (existVariable(ctype_ref.unknown) && $getArraySize(ctype_ref.unknown) > 0$) { - ctype_ref.identifier = ctype_ref.unknown#back; + local it; + createReverseIterator(it, ctype_ref.unknown); + ctype_ref.identifier = key(it); removeVariable(ctype_ref.unknown); } // name of a type