Jump to content
IGNORED

batari Basic feature request - C++ comments


RevEng

Recommended Posts

How about adding in C++ style comments? It's nice to be able to put a small comment right next to a command.

 

I added the following to source/preprocessor.lex...

 

[ \t^]*"//".* {printf("\n rem %s",yytext);}

 

It works for the following kinds of comments:

//case1: completely left-aligned comment
 //case2: comment with 1 or more spaces or tabs first
 dim foo=c //case2: comment beside a command

 

My lexfoo isn't all that strong, so I'm sure there's a better way to do it. The code to do it adds an extra blank line to the assembly, to ensure the rem it generates is correctly aligned.

 

I also want to thank batari for this awesome tool!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...