You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
![image](https://private-user-images.githubusercontent.com/191489062/395226102-9f0e9fe8-314b-4a40-a723-3ccad6af799a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTg0NjQsIm5iZiI6MTczOTU5ODE2NCwicGF0aCI6Ii8xOTE0ODkwNjIvMzk1MjI2MTAyLTlmMGU5ZmU4LTMxNGItNGE0MC1hNzIzLTNjY2FkNmFmNzk5YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwNTQyNDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNzQwN2Y1YTA5Zjc0YmY4OWM3MjBhMWI2ZWJjMTRkNTc3YmQ0NTQ5ZmNjYmU2MmFiYjAzZjZmMWRmZTJiZmEzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.oJcMLKn7Yb4uoZbuebrFVeiVtJeoIoejT-dlGfEhRmM)
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
![image](https://private-user-images.githubusercontent.com/191489062/395227938-426729af-a046-43ed-b7dd-9265857bd170.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTg0NjQsIm5iZiI6MTczOTU5ODE2NCwicGF0aCI6Ii8xOTE0ODkwNjIvMzk1MjI3OTM4LTQyNjcyOWFmLWEwNDYtNDNlZC1iN2RkLTkyNjU4NTdiZDE3MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwNTQyNDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNTg0YTc0ZTA4NmY1ZGMyZjcyMzNjOTI0Y2ZkNTRjMWI3ZDQ0Y2I0ZGE4ZDdjMWQxMzEwNDNlZTk3NmMzNjA0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.1OcKEe6iQZJ524_MZN7auQ1p97EvC5wYeK6GzbwKhNI)
%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: