From: SourceForge.net <no...@so...> - 2008-08-13 19:11:03
|
Patches item #2023939, was opened at 2008-07-22 06:02 Message generated for change (Comment added) made by k_satoda You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=2023939&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: texteditor Group: None >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Matthew Gilbert (voxmea) >Assigned to: Kazutoshi Satoda (k_satoda) Summary: Adds special handling to the C syntax for "#if 0" Initial Comment: Comments-out all code between #if 0 and #endif. ---------------------------------------------------------------------- >Comment By: Kazutoshi Satoda (k_satoda) Date: 2008-08-14 04:11 Message: Logged In: YES user_id=1483238 Originator: NO Thank you for the patch. But the evaluation is Rejected. Following is the reason. I don't think it is not good to support only "#if 0" because it gives false impression that jEdit is evaluating the CPP conditions. Without clear and strong motivation to do that, it won't be accepted. And also this patch has some technical problems. First problem is HASH_CHAR="#if 0". This rejects anything but "#if 0" literally, for example, "#if 0" (two spaces) doesn't match. http://www.jedit.org/users-guide/mode-rule-span-regexp.html But this is easy to fix. HASH_CHAR="#" is a solution. Second problem is that, in contrast of the range comment /* ... */, #if directive can be nested. Thus, simple SPAN_REGEXP doesn't match its behavior. This looks a bit difficult to solve. Another special rule set, say "CPP_SKIPPED", may be required. Last problem is care about #else, #elif, #if 1 ... #else. Looks too difficult for now, at least for me. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=2023939&group_id=588 |