Community
    • Login

    Setting up User Defined Language Comment Section - exclusion issue

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 1 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Chip CooperC
      Chip Cooper
      last edited by

      I’m working on using User Defined Languages to define comments, a .WoWlua interpreter. I trying to set up the comment section.

      For .lua It seems I can either set up for single line comments with “–” (double dash) as an ‘Open’ in Comment Line Style, and this works fine, or I can set up “–[[” in ‘Open’ as a Comment Style with a “]]” for a ‘Close’ but I can’t figure out how to do both.

      If I include the “–” (double dash) in Comment Line Style, the Comment Style starting with “–[[” does not get interpreted as the “–” takes precedent, and it thinks its a
      –Comment containing “[[” as part of the comment, after the “–” double dash…

      –[[ Comment
      …
      ]]
      – type comment and so only --[[ Comment gets treated as a comment, and the rest is ignored.

      I tried something like ->>- and this worked to make the line comment

      Is this something I’ve overlooked, in understanding in using User Defined Language app, or a bug? If so, what am I misunderstanding in the .doc site instructions; or is there a workaround, if a bug?

      Any help with this? Thanks for your consideration.

      1 Reply Last reply Reply Quote 0
      • Chip CooperC
        Chip Cooper
        last edited by

        Wow, so reread documentation again, and it appears that Don of Notepad++, worked with, or had developed a section to handle this exception. I’m seeing that making an interpreter like this is problematic. Kudos for UDL working on that, as I’m sure this wheel gets reinvented for every Language Plugin. So, it’s ironic that the section in UDL doesn’t support operators in the interpretation for forward/reverse logic in the comment section. Not that I know this would help here. In starting the UDL, I picked the comment section as the first part to start with, as it seemed to be the first win I could get, this exception really threw me… till I did what Don had to do for C/C++ that I had to do with .lua which is use the ‘delimiter’ section for the exception. “–” to open/(EOL) as a closer. Worked great, just wish it wasn’t needed, and comments keys could go into comment section.

        So, I ‘resolved’ this… if that’s what one could call it. At least it works now. :-) Can I pat myself on the back, or get admonished for posting a problem I solved simply by RTFM again! lol

        Thanks to those who at least poked in to see if they could help! I think this UDL has a lot of promise! Sure wish I could help; but man, I don’t want to pick up on C/C++ again, it’s been too long. Whereas I’ve had to become more flexible in my old age… I remember C/C++ as very strict, even if as I recall it was one of the most sophisticated ways to write Machine Code!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors