HP Forums
MCODE Syntax Coloring - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: MCODE Syntax Coloring (/thread-14823.html)



MCODE Syntax Coloring - Jurgen Keller - 04-09-2020 08:58 AM

In the thread MCODEing on OSX I mentioned that I also worked on syntax highlighting for MCODE source files. I finally finished (at least for the moment) and published this project.

As I did this mainly just for fun for my personal use, my objective was to make it work for the TextMate editor and for web pages. I ended up with:
  1. a TextMate grammar and a theme file, and
  2. a Pygments lexer and style

The first item is probably not so interesting because I guess there are not many MCODErs using TextMate. The second item is a nice way to publish colored MCODE source files on the Internet. I don't want to go into details here, you'll find some information in the respective Github repository:

HP-41 MCODE Syntax Highlighter

Today I also managed to convert the TextMate grammar into a Visual Studio Code extension. As this editor is in common use, that might be the more interesting option. I've published the extension on the Visual Studio Market Place:

HP-41 Machine Language

Maybe someone finds it useful. If not I had some fun working on it anyway :-)