Tags: xtulnx/gobasic
Tags
Count our line-offsets only AFTER we've updated IFs. Nowadays we rewrite some IF statements, turning this: IF A < B THEN 300 ELSE 400 into this: IF A < B THEN GOTO 300 ELSE 400 By doing this we change the length of our program, and that means that any calculated line-number -> program-offset mapping is off. Calculate the line-number indexes _after_ expansion, to ensure they're always correct.
Merge pull request skx#83 from skx/allow-raw-line-for-if Allow omitting GOTO for IF-tests.
Avoid negative indexes on array-accesses. Found via fuzzing :)
More bounds-checking on parsing of DEF FN. This closes skx#67.
Allow digits in variable-names. This was a simple change, as we only start searching for identifiers when we hit a non-digit. This means if we remove the restriction on numbers we're already guaranteed that we'll have things that don't have a leading digit. Added test case for same. This closes skx#62.
PreviousNext