You are here: PSPad forum > English discussion forum > User highlighters : Adding comment characters

User highlighters : Adding comment characters

#1 User highlighters : Adding comment characters

Posted by: dartiss | Date: 09/27/2011 17:35 | IP: IP Logged

Hi,

I'm attempting to create my own highlighter for IBM 4680 Basic.

It has a number of different ways of identifying comments, such as the explanation mark and the command REM. All of these I can identify with my own highlighter.

However, the back slash character is also used. It's actually used to split code across multiple lines but, as all code afterwards is ignored, it's also used for comments.

Is there a way for me to add this in?

David.

Options: Reply | Quote | Up ^


#2 Re: User highlighters : Adding comment characters

Posted by: pspad | Date: 09/27/2011 19:17 | IP: IP Logged

User highlighter doesn't support splitting lines.
I can add back slash char as comment to PSpad, but you need to describe me rules for this comment style

Options: Reply | Quote | Up ^


#3 Re: User highlighters : Adding comment characters

Posted by: myf | Date: 09/27/2011 20:06 | IP: IP Logged

apropos, backslash "negating" EOL has this meanig in several (mostly C-like) languages:
I am sure about Javascript – in string literals

var str = "a\
b\
c"

is the same as

var str = "abc"

I suppose in C/C++ it is alike, but moreover I recently red quite amusing article ( www.elpauer.org ) describing fact that in C even comment could look like

// comment\
also comment

I know it's quite marginal case and difficulties implementing it in highlighter engine would probably not be be worth it, but no doubt having highlighter that truly reflects syntaxes with all peculiarities would be neat :]

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2014 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák