Annotation of functions
psychoticRabbit
meagain at meagain.com
Tue Feb 20 12:55:31 UTC 2018
On Tuesday, 20 February 2018 at 12:45:25 UTC, rikki cattermole
wrote:
>
> string creater() pure {
> return "void func() {}";
> }
>
> mixin(creator());
>
> That is why. There are plenty of functions, classes and structs
> that simply won't exist in the form of syntax until you execute
> CTFE.
I think I'd fire anyone that wrote functions in that way ;-)
perhaps what I had in mind was a lot simpler.
fn string creater() pure {
return "void func() {}";
}
so now I'm just looking for lines that begin with fn. the mixin
doesn't matter.
the only reason I thought of this annotation thing, was so I
could grep a source code file and count how many functions it had
in it. this seemed the easiest way ;-)
at the moment, that's just not possible - as you mentioned, you
need a front end to process that kind of information (unless you
have an annotation).
More information about the Digitalmars-d
mailing list