Skip to content

Instantly share code, notes, and snippets.

@adamalix
Created March 7, 2012 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamalix/10d1430e28b504b3baff to your computer and use it in GitHub Desktop.
Save adamalix/10d1430e28b504b3baff to your computer and use it in GitHub Desktop.
commented out ast garbage
// Override the constructor for Group so that it gobbles nested Groups, ie
// Group(Group(foo))) => Group(foo)
// Fails to compile with 'method apply is defined twice'
object Group {
def apply[T](items: Query[T]) = {
new Group(Phrase("asdf"))}
items match {
case x: Group[_] => items
case x => new Group(x)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment