Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    New UserDefinedLang - colorizing keywords but not params

    Help wanted · · · – – – · · ·
    3
    6
    91
    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.
    • gibberishbc
      gibberishbc last edited by

      NPP version: 7.7.1
      UDL ver 2.1.0.12

      I am creating a user-defined-language and am unsure how to work the keyword custom colorization.

      As with most languages, I wish to colorize the built-in functions (such as Message(), AskLine(), ArrInfo(), etc). There are several hundred such keywords/functions to colorize.

      However, the parentheses are not delimiting the function parameters from the function name. That is, the functions are not being colorized unless I click the “Prefix Mode” checkbox – but then the parentheses themselves and the parameters inside are also colorized.

      Am I missing something obvious?

      Example:
      Message(“Title of alert”, “Text for alert”)

      Either none of the above is colorized, or (if I turn on Prefix Mode), the entire line is colorized. Desired behavior is that only the keyword Message should be colorized.

      dinkumoil Ekopalypse 2 Replies Last reply Reply Quote 0
      • dinkumoil
        dinkumoil @gibberishbc last edited by

        @gibberishbc

        You have to define the parenthesis as operators.

        In UDL dialog got to (register) Operators & Delimiter -> Operators 1 and add ( and ) (separated by space character).

        See also >>> here <<< and >>> here <<< to read extensive documentation of the UDL feature.

        Ekopalypse 1 Reply Last reply Reply Quote 1
        • Ekopalypse
          Ekopalypse @gibberishbc last edited by

          @gibberishbc said in New UserDefinedLang - colorizing keywords but not params:

          Message(), AskLine(), ArrInfo()

          Define ( and ) as open and closing delimiter using the default colors
          and allow nesting with keywords etc…

          1 Reply Last reply Reply Quote 1
          • Ekopalypse
            Ekopalypse @dinkumoil last edited by Ekopalypse

            @dinkumoil

            you posted 2 minutes before me BUT I’m 100% sure that there was nothing when I posted, how could this be??
            I mean, I know that we could have answered simultaneously but I always check
            if my answer is placed correctly and, as said, I didn’t see your response to OP.
            Strange.

            EDIT: Maybe I need more coffee :-D

            dinkumoil 1 Reply Last reply Reply Quote 0
            • dinkumoil
              dinkumoil @Ekopalypse last edited by

              @Ekopalypse said in New UserDefinedLang - colorizing keywords but not params:

              EDIT: Maybe I need more coffee :-D

              STOP! I think it’s the new forum software which seems to be very buggy. Dont’t drink a coffee whenever an error occurs, you are going to ruin your body. ;-)

              1 Reply Last reply Reply Quote 2
              • Ekopalypse
                Ekopalypse last edited by

                LOL :-D

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright © 2014 NodeBB Forums | Contributors