Remix.run Logo
Creating Your Own Programming Language – Laurence Tratt [video](youtube.com)
34 points by matt_d 6 days ago | 1 comments
fuzztester an hour ago | parent [-]

Coincidentally just saw this video a few days ago.

Interesting approach, to use RPN for expressions, including for the condition in the while statement.

I could understand most of the logic of the interpreter, except for the part about how the while statement is implemented.

I did not quite understand the parts of the code with

  case "while" 
and

  case "end
fragments.

That is, around the region of lines 11 to 14 or so, at about 18:0 in the video.

How does the code there, work?