💾 Archived View for vierkantor.com › xukut › manual › swail › macro.gmi captured on 2024-08-31 at 11:52:37. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-05-10)

-=-=-=-=-=-=-

XukutOS manual → Swail → Macros

A macro is a kind of operator that applies syntax transformations before code is executed. You can use macros to implement your own special forms.

special form: (swail:def-macro name params . code)

`def-macro' creates a new macro with the given parameters, code and the current lexical environment as context. The macro will be in scope for the current environment.

When the macro `name' is in scope and a form `(,name . args)' is to be evaluated, the macro is called with arguments `args', and the result of this call is evaluated instead. The argument list is parsed as if it was a function call.

argument parsing algorithm

Any questions? Contact me:

By email at vierkantor@vierkantor.com

Through mastodon @vierkantor@mastodon.vierkantor.com

XukutOS user's manual: Swail

XukutOS user's manual

XukutOS main page