Commit aa8b856aeb3e2aafd61486349fbb4f40899e682f
1 parent
5d97b206
some more fixes. Still some errors are left.
Showing
4 changed files
with
13 additions
and
6 deletions
| 1 | +#include <malloc.h> | |
| 2 | + | |
| 1 | 3 | #include <identList.h> |
| 2 | 4 | #include <stmtQueue.h> |
| 3 | 5 | |
| 4 | -typedef struct block s_block; | |
| 5 | - | |
| 6 | 6 | struct block /* a stack of used blocks. */ |
| 7 | 7 | { |
| 8 | 8 | s_stmtQueue * stmts; |
| ... | ... | @@ -12,6 +12,11 @@ struct block /* a stack of used blocks. */ |
| 12 | 12 | }; |
| 13 | 13 | |
| 14 | 14 | |
| 15 | +s_identList * | |
| 16 | +blockGetIdl (s_block * block) | |
| 17 | +{ | |
| 18 | + return block->idl; | |
| 19 | +} | |
| 15 | 20 | s_block * |
| 16 | 21 | blockNew (s_stmtQueue * stmts) |
| 17 | 22 | { |
| ... | ... | @@ -19,7 +24,8 @@ blockNew (s_stmtQueue * stmts) |
| 19 | 24 | |
| 20 | 25 | new->stmts = stmts; |
| 21 | 26 | new->prev = NULL; |
| 22 | - new->idl = identListNew (new); | |
| 27 | + new->idl = identListNew (); /* !!!FIXME: i guess idl should know about | |
| 28 | + its block! (Give the block as arg) */ | |
| 23 | 29 | |
| 24 | 30 | return new; |
| 25 | 31 | } | ... | ... |
| ... | ... | @@ -284,7 +284,7 @@ stmtBlock (s_stmt * stmt, s_block * actBlock) |
| 284 | 284 | if (id == NULL) |
| 285 | 285 | exitError (0); |
| 286 | 286 | |
| 287 | - blockSetNonLocalId (args, id); | |
| 287 | + blockSetNonLocalId (gBlock, id); | |
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | |
| ... | ... | @@ -309,7 +309,7 @@ stmtIf (s_stmt * stmt, s_block * actBlock) |
| 309 | 309 | _do = stmtQueueGet (args, 2); |
| 310 | 310 | |
| 311 | 311 | if (_do != NULL) |
| 312 | - stmtDo (_do); | |
| 312 | + stmtDo (_do, actBlock); | |
| 313 | 313 | |
| 314 | 314 | return (u_stmtType) 0; |
| 315 | 315 | } | ... | ... |
Please
register
or
login
to post a comment