corth-lang / Corth

A self-hosted stack based language like Forth
MIT License
7 stars 1 forks source link

`while-do` statements do not check for stack changes #24

Closed HuseyinSimsek7904 closed 9 months ago

HuseyinSimsek7904 commented 9 months ago

Stack should not change between the while and end keywords in a while-do loop. If it does, compiler should show an error.

while
  <cond>
do
  <code>
  // Stack should have not changed between the `while` keyword and here.
end