Indenting in the Outline
pane is incorrect if a macro has a statement without a semicolon immediately prior to the %MEND
statement
#1324
Labels
bug
Something isn't working
If a SAS code file contains macros, and any of those macros contain code that ends without a semicolon immediately prior to the macro's
%MEND
statement, then the macros that follow will be incorrectly indented as if the macros are nested.Here is some nonsense example code that demonstrates the issue:
If this code is opened in VS Code, the
Outline
pane looks like this, even though none of the macros are actually nested:Looking at the colored highlighting within the editor, we can see that the
%mend
statements on lines 6, 12, and 17 are shown in pink, whereas all the others are in blue.The ones highlighted in pink, are ones where the line immediately preceding the
%mend
statement are not terminated by a semicolon. (It should be noted that it is valid for lines not to be terminated by semicolons.)It would appear that the tokenizing/parsing of the code is expecting a semicolon to precede the
%mend
in order to determine the end of a macro definition.The text was updated successfully, but these errors were encountered: