|
Post by Stefan on Jan 14, 2023 4:55:09 GMT -5
Robert,
You'd still need to code up separate macros for each filetype. Their cide is probably largely similar. So there would be multiple macros to maintain.
Given that a macro has access to the filetype and the profile name assigned via EFT, it can easily branch to a SUB or FUNCTION for the appropriate language.
The generalised/common code and the specific twists would all be in the same module.
It could also read (standard thinBasic I/O) a related AUTO file (if available) to obtain language-specific characters to seach for.
With a RegEx string, FIND can search for multiple search-strings in a single operation. So you could search for different comment and/or quotes chars all at once.
You can still issue just one command and have the appropriate action be performed without the need introduce a new notation or change to the Parser.
If you prefer to have separate files for each language-specific bit of code, you can write those separately and INCLUDE them in your main macro module.
|
|