working on make sure types pass properly in grammar
This commit is contained in:
@ -172,7 +172,8 @@ definition:
|
||||
cur = CreateScope(cur, 0, 0);
|
||||
printdebug("Created a new scope");
|
||||
} L_PAREN {
|
||||
TableNode *parameter = getParameter(table_lookup(getAncestor(cur), getType(table_lookup(getAncestor(cur), $1))));
|
||||
TableNode * parameter = getParameter(getTypeEntry(table_lookup(getAncestor(cur), $1)));
|
||||
//TableNode *parameter = getParameter(table_lookup(getAncestor(cur), getType(table_lookup(getAncestor(cur), $1))));
|
||||
printdebug("parameter type: %s", getType(parameter));
|
||||
if (parameter == undefined) {
|
||||
printdebug("[TYPE CHECK] function defined with as, but parameter is undefined at line %d, column %d", @1.first_line, @1.first_column);
|
||||
@ -359,7 +360,7 @@ declaration:
|
||||
}
|
||||
else if(d == TYPE_FUNCTION_TYPE) {
|
||||
printdebug("invalid (function) type passed in declaration list in dblock", @2.first_line, @2.first_column);
|
||||
d = TYPE_FUNCTION_TYPE;
|
||||
d = TYPE_FUNCTION_DECLARATION;
|
||||
CreateEntry(cur,d,(TableNode*)$1,$3,getAdInfo((TableNode*)$1));
|
||||
}
|
||||
else if(d == TYPE_ARRAY_TYPE){
|
||||
|
Reference in New Issue
Block a user