You are here: PSPad forum > English discussion forum > Feature request: User highlighter nested comments

Feature request: User highlighter nested comments

#1 Feature request: User highlighter nested comments

Posted by: ulrich | Date: 2009-01-26 22:38 | IP: IP Logged

Hi,

currently I am developing a new scripting language. In this language I have

- block comments starting with '* and ending with *'
They may be nested too: block comments in block comments, span over several lines and also in line between code, eg:

2 + 3 '*add *' - 4 '* subtract *'

- strings are marked by double quotes and may span several lines:

"This string
continues on this line"

Also inside a string a double quote character can be escaped by doubling it:

"This ""string"" is a string"

For all of these cases the user highlighter available does not allow or is not expressive enough to set highlighting for above cases.

It would be nice if the user highlighter could be altered accordingly. Perhaps a BlockCommentBegin and BlockCommentEnd tag could be introduced for the INI files.

Thanks for considering.

Edited 2 time(s). Last edit at 2014-10-22 08:27 by Stefan.

Options: Reply | Quote | Up ^


#2 Re: Feature request

Posted by: pspad | Date: 2009-01-27 13:24 | IP: IP Logged

User highlighter doesn't supports nested comments

Options: Reply | Quote | Up ^


#3 Re: Feature request

Posted by: BryanG | Date: 2014-10-20 17:48 | IP: IP Logged

Is there any thought to adding nested comments support?

I am another Progress/Openedge developer and the language does (sort of) use nested comments.

The main problem it causes in the editor for me is when I comment out code that has a comment, like this

/* This code will update a record */
order.shipped = TRUE.

So I want to temporarily comment this code out and work with it, kind of like this

/* Comment out update for now
/* This code will update a record */
order.shipped = TRUE.
*/

So the multi-line comment includes the commented code, but the user highlighter will show the "order.shipped = TRUE" line as regular code instead of continuing the comment color until the matching comment character is reached. So I'm looking at code that isn't actually being executed, but the highlighting would make me think that it is being executed.

Options: Reply | Quote | Up ^


#4 Re: Feature request

Posted by: Andreas | Date: 2014-10-20 18:42 | IP: IP Logged

Maybe no solution for your problem but a tip how to easily switch a block from active to inactive and vv.

<?php

/** *
echo 'I am inactive';
/** */

/** */
echo 'I am active code';
/** */

/** My debug block */
print_r($myVar);
/** */

/** My debug block *
print_r($myVar);
/** */

?>

As you can see you just have to handle the last slash in a blocks first lines end. Copy into a php document in PSPad to see the effect with syntax highlighter.

Options: Reply | Quote | Up ^






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