Eslisp: Macro that compiles its arguments
esl = require("eslisp@0.8.1")
esl(`
(macro intercept
(lambda ()
; Compile each of the arguments into estree
(= estree ((. ((. Array from) arguments)
map)
(. this compile)))
; Do whatever you like with the estree data
((. console log) estree)
(return estree)))
(intercept
; Your whole program goes here
((. console log) "hi")
)
`)
no comments