Fix multiple statements

This commit is contained in:
bʰedoh₂ swé 2024-06-11 02:53:49 +05:00
parent eda259dfbf
commit b673f99433

View File

@ -135,6 +135,8 @@ char* compile(tSyntaxElement* syntaxtree) {
char* result = calloc(1,sizeof(char)); char* result = calloc(1,sizeof(char));
while (1) {
if (se_istraversable(syntaxtree)) { if (se_istraversable(syntaxtree)) {
if (syntaxtree->content.syntax->type == TOKEN) { if (syntaxtree->content.syntax->type == TOKEN) {
@ -169,6 +171,12 @@ char* compile(tSyntaxElement* syntaxtree) {
} }
if (syntaxtree->next != NULL)
syntaxtree = syntaxtree->next;
else break;
}
return result; return result;
} }