@HalfOffHell said in UDL token cannot be both folding indicator and operator/delimiter.:
If you don’t know any workarounds, can you point me to where in the source code the coloring/folding/UDL happens? You seem like a well-informed person.
Thanks, but I’m not that guy…I just spent a year and half wrestling with the different parts to come up with my own UDL package leaning heavily on the more expert users here.
I’m not sure if you’re working backwards from the normal process, as most people create the color highlighting UDL, first, using the rules of the UDL 2.1 language to implement their chosen language, and then enhance color processing with the EnhanceAnyLexer plugin that the UDL didn’t. Then they implement the FunctionList functionality or the Autocomplete functionality to get a somewhat more complete IDE type environment.
You sound like you started with EnhanceAnyLexer and are now trying to force the UDL to work with those things. Like I always say, more complexity leads to more problems. I still don’t understand why you need that multi-faceted use out of a single keyword or keyword/pair. Are you actually doing a language or just experimenting with the capabilities of doing something short of writing a plugin or submitting changes to the Notepad++ base code?
The UDL is a part of the source code of Notepad++, and is located on NPP’s GitHub Repository. Any changes except for your own use, would have to be submitted to the developer for approval of inclusion to the base code.
In addition, Notepad++ uses the Scintilla/Lexilla libraries for the editor’s capabilities.
@HalfOffHell said in UDL token cannot be both folding indicator and operator/delimiter.:
I don’t see why or how operators and delimiters would interfere with folding, they are just for color I think?
They do because they are being searched differently. To use the open keyword as an Operator, it has to go into Operator 2, which uses a backward searching capability, and the Delimiters and Code Folding uses the Forward search.
You should read more of the manual, and the UDL 2.1 spec layed out in both the Online User Manual and the Ivan Radic documentation, and try to see how everything works together as is.
I don’t think the system as is, is going to work the way you want. You might need to employ using the PythonScript capabilty, or writing your own parser as a plugin. All of these are going to involve becoming familiar with the capabilities and functions of the Scintilla libraries and there are much more knowledgeable individuals here that can help you further, if you start posting actual information rather than just screenshots and vague statements about what you’re doing.
Edit: I just noted that your screenshot states it’s a C++ UDL, so my guess is, that you’re trying to further expand C++, which is beyond my ability to help, as originally I tried using the C++ FunctionList as an example for mine and went quickly down a rabbit hole, just barely able to get out before I lost my mind. :-)