Open bitaoz opened 2 weeks ago
New a .sas file, type code '%macro test;' at line1 and type Enter to the next line, type code '%let num=1;', it will indent automatically.
Auto indent works improperly with '%mend;' Type code below
%macro reportit(reuest);
%if %upcase(&request)=STAT %then
%do;
proc means;
title "summary of all numric variables";
run;
%end;
%else %if %upcase(&request)=PRINTIT %then
%do;
proc print;
title "listing of data";
run;
%end;
%else %put incorrect type;
title;
Type Enter at the end of 'title;', try to type '%mend;'
Indentation has different behavior with 'set' statement
data popstate;
set pf70 pm70 pf80 pm80;
data _null_;
set sashelp.cars(drop=origin enginesize cylinders horsepower weight wheelbase length);
Auto indent works improperly with typing %mend + macro name; Scenario1: If the macro code block nested with other code block.
%macro test;
%let num=1;
proc print data=sashelp.cars(obs=1);
run;
%mend test;
Scenario2: Different behavior between topic build and main build
Summary Resolve https://github.com/sassoftware/vscode-sas-extension/issues/652, Add a new zone MACRO_SUB_OPT_NAME, which is similar to PROC_SUB_OPT_NAME, VIEW_OR_PGM_SUB_OPT_NAME. It's the subtype of SUB_OPT_NAME.
Testing Type "%macro test (test);" and "enter", Indentation works properly.