Community

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

    Need Help in "Define your language" section

    Help wanted · · · – – – · · ·
    2
    2
    1189
    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.
    • Anand Mohan
      Anand Mohan last edited by

      Hi,

      I’m Adding PL1/PLI language to Npp, in that i need to add the folding for proc statements

      Example code will be like

      abc; PROC;
      statement 1;
      statement 2;
      statement 3;
      end abc;

      the statement 1,2 and 3 may contain “END;” as a statement, so i cannot use "END"as the end-of-fold

      So i need a folding for

      ***; proc;
      statement 1;
      statement 2;
      statement 3;
      end; ***;

      *** can be anything which is procedure name…

      1 Reply Last reply Reply Quote 0
      • Jim Dailey
        Jim Dailey last edited by

        @Anand-Mohan

        I don’t know PL1, but if it has any type of preprocessing ability like C does, you could do something like this:

        #define procend end
        

        and then use “procend” in your code. This is not ideal, I admit.

        Otherwise, I think you have to define all the statement N’s you might use as the beginning of some fold (Open:) and add the corresponding number of “end” statements to end the fold (Close:). That is, you can have multiple Open:, Middle: and Close: tokens; just make sure they are in the correct order (first Close: goes with the first Open:, etc.).

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