You are here: PSPad forum > English discussion forum > Write a custom Code Explorer parser?
Posted by: pspad | Date: 2018-12-11 09:09 | IP: IP Logged
SAS has code parser for code explorer included in PSPad.
If you have use highlighter, change file type for code explorer to ftSAS
Posted by: bomans007 | Date: 2018-12-11 18:13 | IP: IP Logged
Hi
Thanks for the swift reply!
pspad indeed includes a sas highligher(looked over it), I changed also the 'CodeExplorer file typ' to ftSas (as you recommend).
And now the code explorer loads indeed 3 types: libraries, Data and procedures which is really great.
But I still miss the Macro overview, would it be possible to extend this ftSas code explorer file with this?
The reason is that we include a lot of these macro's in our code(they have a meaningful name) so we can work with it as a 'function' -> This way we are able to structure our code much better.
I believe strongly this would be very convenient for other sas developers as well.
Just a question, no obligation off course.
Frank
Posted by: pspad | Date: 2018-12-11 19:15 | IP: IP Logged
Hello
I can extend SAS code explore, but I need some source sample and description what you want to see in code explorer window
Posted by: bomans007 | Date: 2018-12-12 11:00 | IP: IP Logged
Hi
The syntax to define a macro looks as follows:
%macro MacroFunctionName;
...
Code
...
%mend MacroFunctionName;
where MacroFunctionName is the name of the macro definition(which is probably pretty obvious but just to be clear )
below a (more or less)full sas code snippet of a macro function.
/*-----------------------------------*/
/* Check if there was data found */
/*-----------------------------------*/
%macro check_if_edc_found;
%let timenow=%sysfunc(time(), time.);
%put ----- [&timenow] MACRO: check_if_edc_found -----;
%global nr;
data _null_;
set SAVE.EDCdata_all end=end;
if end then call symputx('nr',_N_);
run;
%put SAVE.EDCdata_all: nr of observations=&nr;
%if "&nr"="" %then %do;
data _null_;
file _webout;
/* Set title of webpage */
put "<title>No data found</title>";
[...]
put "</body></html>";
run;
%let abort=1;
%abort;
%end;
%mend;
Posted by: pspad | Date: 2018-12-12 11:50 | IP: IP Logged
Will be available in the next build for ftSAS code parser type
Posted by: bomans007 | Date: 2018-12-12 13:20 | IP: IP Logged
Hey
╱╱┏╮
╱╱┃┃
▉━╯┗━╮
▉┈┈┈┈┃
▉╮┈┈┈┃
╱╰━━━╯
Thanks!!!
Any outlook on when this will be(roughly estimated)?
This way I can temper my colleagues their enthousiasme for a while
Posted by: pspad | Date: 2018-12-12 13:35 | IP: IP Logged
I will release it this weekend I hope
Posted by: bomans007 | Date: 2018-12-12 15:29 | IP: IP Logged
wow, I've to say much faster than expected!
Thanks again for the GREAT support!
Posted by: bomans007 | Date: 2018-12-19 15:22 | IP: IP Logged
not to be willing impatient, just to know the outlook, any idea when you would find time(supposing somewhere next year?)
Posted by: pspad | Date: 2018-12-19 16:15 | IP: IP Logged
Build with your highlighter was released last weekend. Look at developer forum
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR