did a little clean up. Note- I don't think reserve is being linked through the library
This commit is contained in:
@ -688,7 +688,7 @@ simple_statement:
|
||||
if(getAdInfoType((TableNode*)$1) == TYPE_ARRAY || getAdInfoType((TableNode*)$1) == TYPE_FUNCTION_DECLARATION){
|
||||
PushContext(getTypeEntry((TableNode*)$1));
|
||||
|
||||
printf("pushed %s to context stack in simple statement assignable rule\n",getName(getContextTypeEntry(context_head)));
|
||||
//printf("pushed %s to context stack in simple statement assignable rule\n",getName(getContextTypeEntry(context_head)));
|
||||
}
|
||||
S_Push(TrueList, S_Init(), 0);
|
||||
S_Push(FalseList, S_Init(), 0);
|
||||
@ -1204,16 +1204,9 @@ expression:
|
||||
TableNode* node = CreateEntry(cur,TYPE_ARRAY, getContextTypeEntry(context_head), temp, NULL);
|
||||
emit_reserve(node, tn_or_const(NODE,$2));
|
||||
$$ = node;
|
||||
}else if(((getTypeEntry((TableNode*)$2)) == getArrType(getContextTypeEntry(context_head)))
|
||||
&& (getAdInfoType(getContextTypeEntry(context_head)) == TYPE_ARRAY_TYPE)){
|
||||
char* temp = temp_var_gen();
|
||||
//does this have integer?
|
||||
TableNode* node = CreateEntry(cur,TYPE_ARRAY, getContextTypeEntry(context_head), temp, NULL);
|
||||
emit_reserve(node, tn_or_const(NODE,$2));
|
||||
$$ = node;
|
||||
}else{
|
||||
printf("%s on right %s on left\n",getType((TableNode*)$2),getName(getArrType(getContextTypeEntry(context_head))));
|
||||
printf("%s is the name of the left\n",getName(getContextTypeEntry(context_head)));
|
||||
}else{
|
||||
//printf("%s on right %s on left\n",getType((TableNode*)$2),getName(getArrType(getContextTypeEntry(context_head))));
|
||||
//printf("%s is the name of the left\n",getName(getContextTypeEntry(context_head)));
|
||||
$$ = undefined;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user