Skip to content

Instantly share code, notes, and snippets.

@ochafik
Last active December 13, 2015 23:49
Show Gist options
  • Save ochafik/4994373 to your computer and use it in GitHub Desktop.
Save ochafik/4994373 to your computer and use it in GitHub Desktop.
Runtime Extension Plugin
@extend(Any) def quoted(quote: String) = quote + self + quote
// Transformed AST after the compiler plugin's phase:
implicit class quoted(self: Any) {
def quoted(quote: String) = quote + self + quote
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment