Need Help in "Define your language" section

  • 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…

  • @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.).

Log in to reply