hlorenzi / customasm

💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/
Apache License 2.0
720 stars 56 forks source link

Write Comments into Annotated text output formats #75

Open skicattx opened 3 years ago

skicattx commented 3 years ago

I would like to have the code comments from the source file inserted into the annotated output formats, either by default, or with another output type. My debugger can load these files and it's much easier to source debug larger programs if the comments from the original source are there.

I took a look through the rs and it appears you just skip comments right after tokenizing, so it's not as simple as just not skipping comments, as then it gets all confused trying to parse comments as commands, but it should not be too hard to grab this from the original tokens when parsing the spans on output?