Ready for Dev! 🎉

This commit is contained in:
Scarlett
2025-04-04 15:42:50 -04:00
parent 4e862d54a4
commit d1aa7f7e0f
4 changed files with 55 additions and 33 deletions

View File

@ -196,7 +196,7 @@ definition:
printdebug("function defined with as, but parameter is type %s at line %d, column %d", getType(parameter),@1.first_line, @1.first_column);
} else {
for (TableNode* entry = getFirstEntry(getRecList(parameter)); entry!= NULL; entry = getNextEntry(entry)) {
CreateEntry(cur, entry, NULL, NULL);
CreateEntry(cur, entry->theType, NULL, NULL);
}
}
}
@ -258,8 +258,11 @@ idlist:
sblock:
L_BRACE
{
if (getLine(cur) != 0 && getColumn(cur)) {
if (getLine(cur) != 0) {
cur = CreateScope(cur,@1.first_line,@1.first_column);
} else {
setLineNumber(cur, @1.first_line);
setColumnNumber(cur,@1.first_line);
}
}
statement_list
@ -288,7 +291,16 @@ sblock:
dblock:
L_BRACKET declaration_list R_BRACKET;
L_BRACKET
{
if(getLine(cur)==0) {
setLineNumber(cur, @1.first_line);
setColumnNumber(cur,@1.first_line);
} else {
cur = CreateScope(cur,@1.first_line,@1.first_column);
}
}
declaration_list R_BRACKET;