nand2tetris / web-ide

A web-based IDE for https://nand2tetris.org
https://nand2tetris.github.io/web-ide
Other
38 stars 11 forks source link

Fix asm parsing bugs #248

Closed netalondon closed 3 months ago

netalondon commented 3 months ago

Before the change, the assembler would allow for 2 instructions to be on the same line, and would accept spaces between instruction parts, i.e @ 2

DavidSouther commented 3 months ago

Aww I added that as a feature because I liked being able to write @value CInst as one thing. I emailed Shimon to see if he's OK with that change in the spec.

netalondon commented 3 months ago

Aww I added that as a feature because I liked being able to write @value CINST as one thing. I emailed Shimon to see if he's OK with that change in the spec.

Oh, I see. Our main issue was that you could have them not separated by a space, like this: @2D=A. I assume that wasn't the intention? Anyway, let's wait to hear from Shimon.

DavidSouther commented 3 months ago

Ohhh yeah that's a problem! There must be some whitespace, but I found it nice to have them on the same line. (And there should be no white space between the @ and the value)