aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pc.y12
1 files changed, 9 insertions, 3 deletions
diff --git a/pc.y b/pc.y
index f00d4fe..a4a918b 100644
--- a/pc.y
+++ b/pc.y
@@ -102,21 +102,27 @@ program
id_list
:ID
{
+ /*TODO remove check_ids*/
+ node *tmp;
check_id(cur_scope, $1);
- $$ = scope_insert(cur_scope, $1);
+ tmp = scope_insert(cur_scope, $1);
+ $$ = mkid(tmp);
}
|id_list ',' ID
{
- check_id(cur_scope, $3);
+ node *tmp;
- $$ = mktree(LIST, $1, scope_insert(cur_scope, $3));
+ check_id(cur_scope, $3);
+ tmp = scope_insert(cur_scope, $3);
+ $$ = mktree(LIST, $1, mkid(tmp));
}
;
var_declarations
:var_declarations VAR id_list ':' type ';'
{
+ /*CHECK IDS HERE*/
ptree *tmp;
for(tmp = $3; tmp; tmp = tmp->l) {
tmp->type = $5;