barrettotte / vscode-ibmi-languages

Syntax highlighting for IBM i languages such as RPG, CL, DDS, MI, and RPGLE fixed/free.

Home Page:https://marketplace.visualstudio.com/items?itemName=barrettotte.ibmi-languages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RPGLE mixed fix/free: FREE preprocessor exits subroutine scope

barrettotte opened this issue · comments

      begsr testSubr1;
        dcl-s x int(10) inz(*zero);

      /FREE
        dsply ('FREE!');
      /END-FREE
     C                   ADD       1             X
        x += 1;
      /FREE
        x += 1;
     C                   ADD       1             X
      endsr;

      begsr testSubr2;
        dcl-s x int(10) inz(*zero);
     C                   ADD       1             X
        // previous FREE directive should've been closed
        //   at end of testSubr1
      endsr;

image

I'm not sure how often this happens, but it should be an easy fix. Exit /FREE directive highlighting if endsr is encountered