Blocks

Blocks are written using BLOCK(tree, ...):

import treehugger.forest._, definitions._, treehuggerDSL._

val tree = BLOCK(
  VAL("x") := LIT(0),
  REF("x")
)
// tree: Block = Block(
//   List(
//     ValDef(
//       Modifiers(0L, TypeName(""), List()),
//       Ident(TermName("x")),
//       Literal(Constant(0))
//     )
//   ),
//   Ident(TermName("x"))
// )

treeToString(tree)
// res0: String = """{
//   val x = 0
//   x
// }"""