Mercurial > archived > louis > epitech > mq > rathaxes
comparison rathaxes_compiler_passes_look_for_locally_casted_variables_in_sequence_calls.patch @ 115:5a663f8f0e54
WIP, fix another small bug in rathaxes sequence calls
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Mon, 22 Jul 2013 13:52:00 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
114:8eac160e5f1c | 115:5a663f8f0e54 |
---|---|
1 # HG changeset patch | |
2 # User David Pineau <dav.pineau@gmail.com>, Louis Opter <louis@lse.epita.fr> | |
3 # Parent 163975605ce8e4b9049deb60207358acc904f14c | |
4 rathaxes: correctly resolve locally casted variables during sequence calls | |
5 | |
6 C variables declared locally and casted into Rathaxes types weren't | |
7 taken into account during sequence calls. This changeset fixes it. | |
8 | |
9 diff --git a/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws b/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws | |
10 --- a/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws | |
11 +++ b/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws | |
12 @@ -751,6 +751,8 @@ | |
13 local theType; | |
14 if (findElement(theVar.name, theChunk.type_map)) | |
15 ref theType = theChunk.type_map[theVar.name]; | |
16 + else if (findElement(theVar.name, theChunk.variables)) | |
17 + ref theType = theChunk.variables[theVar.name].type_node; | |
18 insert param.rtype; | |
19 if (getArraySize(param.identifiers) > 2) | |
20 { |