Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (31 sloc) 0.919 kb
use("core")
use("define")
use("control-flow")
use("node")
macro(when-compiling ~(b: Block)):
b body evaluate(Atomy::CodeLoader context)
'nil
Atomy::AST open:
ast(LetMacro(.body, [.macros]))
LetMacro bytecode(g) := do:
[mod, bnd] = Atomy make-wrapper-module
mod delegate = Atomy::CodeLoader module
before-mod = Atomy::CodeLoader module
before-ctx = Atomy::CodeLoader context
mod include(before-mod)
mod extend(before-mod)
mod using << before-mod
{ Atomy::CodeLoader module = mod
Atomy::CodeLoader context = bnd
@macros each [m]:
mod define-macro(m pattern, m body, Atomy::CodeLoader compiling)
body compile(g)
} ensuring:
Atomy::CodeLoader module = before-mod
Atomy::CodeLoader context = before-ctx
macro(let-macro(~*ms) ~(b: Block)):
LetMacro new(
node line
b body
ms collect [`(~p = ~b)]:
`(macro(~p): ~b))
Jump to Line
Something went wrong with that request. Please try again.