FlatAssembler / PicoBlaze_Simulator_in_JS

Simulator (more accurately: an assembler and an emulator) for Xilinx PicoBlaze, runnable in a browser. That is my Bachelor thesis.
https://picoblaze-simulator.sourceforge.io/
MIT License
23 stars 3 forks source link

The syntax highlighter inserts a semi-colon `;` after `<` and `>` #7

Open FlatAssembler opened 1 year ago

FlatAssembler commented 1 year ago

If you type this program:

if 2+2<5
  display "Correct!"
  display a
endif

And then press "Highlight Assembly", the syntax highlighter turns it into this program:

if 2+2<;5
  display "Correct!"
  display a
endif

Which is no longer a valid PicoBlaze Assembly program.

FlatAssembler commented 1 year ago

Here is what appears to be causing the problem: https://github.com/FlatAssembler/PicoBlaze_Simulator_in_JS/blob/9eb92c4e1ef31c17cedcbfa5f09b8a75dcfad386/headerScript.js#L146 But removing that, of course, causes more problems than it solves.

FlatAssembler commented 1 year ago

I've added an error message in case somebody tries to highlight a program containing <, > or &: https://github.com/FlatAssembler/PicoBlaze_Simulator_in_JS/commit/2390e425f3f7d5bcc435c5dd1ff54b4f2a85b6a5