Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
~
% 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
You can’t perform that action at this time.