Template evaluation engine. Now hygienic.
Consts
evalTemplateLimit = 1000
- Source Edit
Procs
proc evalTemplate(n: PNode; tmpl, genSymOwner: PSym; conf: ConfigRef; ic: IdentCache; instID: ref int; idgen: IdGenerator; fromHlo = false): PNode {. ...raises: [Exception, ERecoverableError, KeyError], tags: [RootEffect].}
- Source Edit
proc evalTemplateArgs(n: PNode; s: PSym; conf: ConfigRef; fromHlo: bool): PNode {. ...raises: [Exception, ERecoverableError, KeyError], tags: [RootEffect].}
-
Produces an nkArgList node storing all arguments taken from the call-like expression n. Immediate templates/macros are also considered, by making sure enough parameters are provided and by inserting the default for parameters where no argument is provided.
Despite the name, the procedure also applies to macro arguments.
Source Edit