Fix NULL statements function declarations
This commit is contained in:
parent
ae03a25542
commit
f674577437
|
@ -92,14 +92,10 @@ LINEBLOCK* compilefunbody(SCOPE* s, CLASS* cl, SUBROUTDEC* d) {
|
||||||
LINEBLOCK* compilefundec(SCOPE* s, CLASS* cl, SUBROUTDEC* f) {
|
LINEBLOCK* compilefundec(SCOPE* s, CLASS* cl, SUBROUTDEC* f) {
|
||||||
LINE* label = mksubdeclabel(cl, f);
|
LINE* label = mksubdeclabel(cl, f);
|
||||||
|
|
||||||
if(f->body->statements != NULL) {
|
|
||||||
LINEBLOCK* body = compilefunbody(s, cl, f);
|
LINEBLOCK* body = compilefunbody(s, cl, f);
|
||||||
appendlnbefore(body, label);
|
appendlnbefore(body, label);
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return mklnblk(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
LINEBLOCK* compileconstructor(SCOPE* s, CLASS* cl, SUBROUTDEC* con) {
|
LINEBLOCK* compileconstructor(SCOPE* s, CLASS* cl, SUBROUTDEC* con) {
|
||||||
LINE* label = mksubdeclabel(cl, con);
|
LINE* label = mksubdeclabel(cl, con);
|
||||||
|
|
Loading…
Reference in New Issue