summaryrefslogtreecommitdiff
path: root/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala
diff options
context:
space:
mode:
authorLi Haoyi <haoyi@dropbox.com>2014-11-03 22:41:55 -0800
committerLi Haoyi <haoyi@dropbox.com>2014-11-03 22:41:55 -0800
commit25d3233bae4ca89ba3a3916dfa9b45ee42d66435 (patch)
treed7cefbcc72cb7eb8e8a0abb120b375208bd4fd15 /scalatexApi/src/main/scala/scalatex/stages/Compiler.scala
parented923d3445e1f304949eee2ee414987d98756a86 (diff)
downloadhands-on-scala-js-25d3233bae4ca89ba3a3916dfa9b45ee42d66435.tar.gz
hands-on-scala-js-25d3233bae4ca89ba3a3916dfa9b45ee42d66435.tar.bz2
hands-on-scala-js-25d3233bae4ca89ba3a3916dfa9b45ee42d66435.zip
Enabled a bunch more tests...
Diffstat (limited to 'scalatexApi/src/main/scala/scalatex/stages/Compiler.scala')
-rw-r--r--scalatexApi/src/main/scala/scalatex/stages/Compiler.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala b/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala
index a305199..19cec10 100644
--- a/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala
+++ b/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala
@@ -6,9 +6,7 @@ import scala.reflect.macros.whitebox.Context
import scala.reflect.internal.util.{Position, OffsetPosition}
/**
- * Walks the parsed AST, converting it into an un-structured Scala source-blob
- * which when compiled results in a function that can be used to generate the
- * given Frag at runtime.
+ * Walks the parsed AST, converting it into a structured Scala c.Tree
*/
object Compiler{
@@ -17,7 +15,7 @@ object Compiler{
import c.universe._
def fragType = tq"scalatags.Text.all.Frag"
-
+ println(template)
def compileChain(code: String, parts: Seq[Ast.Chain.Sub], offset: Int): c.Tree = {
parts.foldLeft(c.parse(code)){
case (curr, Ast.Chain.Prop(str, offset2)) => q"$curr.${TermName(str)}"