olix3001/PurrLang

[FEAT] macros

Opened this issue · 0 comments

Not always we want to generate a scratch procedure to repeat an action. For example currently implemented std::io::ask could be always inlined as It is very simple, so why add call overhead to it.

Macros would work just like normal functions in almost all aspects except that they will always be inlined and they'd support comptime conditionals and loops on arguments.

Syntactically they are exactly the same as functions except they use macro keyword on their definition instead.