You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.
It's impossible to use an if or while block inside of a macro, as it results in a compiler error. Simulation or compile doesn't matter, it's broken in both.
Example
macro test
2 1 < if
12 print
end
end
Compile result
$ python porth.py sim borked.porth
Traceback (most recent call last):
File "porth.py", line 924, in <module>
program = compile_file_to_program(program_path, include_paths);
File "porth.py", line 862, in compile_file_to_program
return compile_tokens_to_program(lex_file(file_path), include_paths)
File "porth.py", line 709, in compile_tokens_to_program
block_ip = stack.pop()
IndexError: pop from empty list
It's impossible to use an
if
orwhile
block inside of a macro, as it results in a compiler error. Simulation or compile doesn't matter, it's broken in both.Example
Compile result
Version d7ecaa2
The text was updated successfully, but these errors were encountered: