Skip to content

Instantly share code, notes, and snippets.

xeno-by / gist:1548942
Created Jan 2, 2012
First prototype of Scala quasiquotes
View gist:1548942
/** This demo shows:
* Syntax for quasiquotations
* String interpolation as a quasiquote
* Code quoting as a quasiquote
* Pattern matching against code quotes
* Some capabilities of brand new Scala reflection API (typechecking, compiling and running ASTs)
>scala -Xquasiquotes -Yquasiquote-debug
Welcome to Scala version (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_25).