tsoding / porth

It's like Forth but in Python
629 stars 50 forks source link

Type checking of swap/over/etc. #116

Open GalHorowitz opened 2 years ago

GalHorowitz commented 2 years ago

Currently The type checker handles the swap operation by just popping the (type, location) tuple from the type stack and then pushing the tuples back in the new order, but this means the source location in the tuple doesn't change, i.e. the arguably real source of the element (the swap operation) is not recorded. Is this really the intended behavior?

This is not limited to the SWAP operation of course