Can you parse the d source file during compile time with std.regex?

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 1 09:20:07 PDT 2017


On Tuesday, 1 August 2017 at 16:16:46 UTC, 12345swordy wrote:
> I don't see this anywhere in the documentation. I am asking 
> this as I want to know that it's possible to create a attribute 
> to prevent certain functions being called in the body of a 
> function. To enforce a certain code standard upon myself.

UDA's are your friend here.
There is no need to use parser, and in any case std.regex cannot 
match the regex at ct.



More information about the Digitalmars-d-learn mailing list