WIP. Storing code in line numbers and listing is working. Added a RUN command, and refactored the line runner logic out of basic_repl into basic_run_line. The repl still works but the RUN function is busted. The parser logic is increasingly getting in the way, and the solver is not as useful as I originally thought. The original design of the datastructures and logic is getting in my way and adding confusion. I may need to try something simpler.

This commit is contained in:
2024-05-07 08:08:40 -04:00
parent ee10cc6eb5
commit 559ff15dc0
3 changed files with 192 additions and 60 deletions

View File

@@ -40,7 +40,10 @@ int main(void)
if ( basic_errno != 0 ) return 8;
if ( result.flags != (BASIC_VARFLAG_INIT | BASIC_VARFLAG_TSTR) ) return 9;
if ( result.value.ptr == NULL ) return 10;
if ( strcmp((char *)&basic_memory_lines[10], expr.rval.ptr) != 0 ) return 11;
if ( basic_last_stored_lineno != 9 ) return 11;
printf("last stored line number: %d\n", basic_last_stored_lineno);
printf("stored memory line 10 equals: %s\n", basic_memory_line_address(basic_last_stored_lineno));
if ( strcmp(basic_memory_line_address(basic_last_stored_lineno), expr.rval.ptr) != 0 ) return 12;
return 0;