Created
April 2, 2015 06:06
-
-
Save Yuichiroh/c0057381a596aa2f0256 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ | |
% scala -Xprint:parser | |
Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> [[syntax trees at end of parser]] // <init> | |
package <empty> { | |
class $repl_$init extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
<empty> | |
} | |
} | |
[[syntax trees at end of parser]] // <console> | |
package $line1 { | |
object $eval extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
var value: scala.tools.nsc.interpreter.IMain = _; | |
def set(x: Any) = value = x.asInstanceOf[scala.tools.nsc.interpreter.IMain] | |
} | |
} | |
[[syntax trees at end of parser]] // <console> | |
package $line2 { | |
object $read extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
object $iw extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
object $iw extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
val $intp = $line1.$eval.value | |
} | |
} | |
} | |
} | |
[[syntax trees at end of parser]] // <console> | |
package $line2 { | |
object $eval extends scala.AnyRef { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
lazy val $result = $line2.$read.$iw.$iw.$intp; | |
lazy val $print: String = { | |
$line2.$read.$iw.$iw; | |
"" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment