Demystifying Macros

What are Macros?

Something something AST Change your language without forking the compiler or interpreter of your language

What is the AST?

Abstract Syntax Tree Datastructure output after lexing and parsing

Lexer? Parser?

Lexer tokenizes Parser well, parses, output of Lexer

Enough definitions! How can I use them?

Python

https://github.com/lihaoyi/macropy#macropy-103 https://github.com/lihaoyi/macropy#30000ft-overview https://github.com/lihaoyi/macropy#case-classes https://github.com/lihaoyi/macropy#pinq-to-sqlalchemy

Javascript

http://sweetjs.org/ https://github.com/jlongster/es6-macros#es6-macros http://jlongster.com/Stop-Writing-JavaScript-Compilers--Make-Macros-Instead

Lisp

Python flavored: http://docs.hylang.org/en/latest/

Compile to javascript: http://clojurescript.net/ http://jeditoolkit.com/try-wisp/ https://github.com/lantiga/ki

JVM

http://clojure.org