diff options
author | Robey Pointer <robey@twitter.com> | 2012-05-08 18:28:54 -0700 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-07 02:08:38 -0500 |
commit | eec131eb18eb7ca7eb66fa7816349e326952e84a (patch) | |
tree | 87a4667608510dd1fb4c979fe7fdba58357fb679 /libraries | |
parent | 0318bf2b10782180940d5144ba6492b54e2bdd59 (diff) | |
download | cbt-eec131eb18eb7ca7eb66fa7816349e326952e84a.tar.gz cbt-eec131eb18eb7ca7eb66fa7816349e326952e84a.tar.bz2 cbt-eec131eb18eb7ca7eb66fa7816349e326952e84a.zip |
[split] capitalize Scala and document the indentation parameter.
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/eval/Eval.scala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libraries/eval/Eval.scala b/libraries/eval/Eval.scala index 522dcc7..3c3efc8 100644 --- a/libraries/eval/Eval.scala +++ b/libraries/eval/Eval.scala @@ -43,7 +43,7 @@ object Eval extends Eval { } /** - * Evaluates files, strings, or input streams as scala code, and returns the result. + * Evaluates files, strings, or input streams as Scala code, and returns the result. * * If `target` is `None`, the results are compiled to memory (and are therefore ephemeral). If * `target` is `Some(path)`, the path must point to a directory, and classes will be saved into @@ -106,7 +106,8 @@ class Eval(target: Option[File]) { ) ) - private[this] lazy val compiler = new StringCompiler(2, target) + private[this] val STYLE_INDENT = 2 + private[this] lazy val compiler = new StringCompiler(STYLE_INDENT, target) /** * run preprocessors on our string, returning a String that is the processed source @@ -269,6 +270,13 @@ class Eval(target: Option[File]) { private[util] def fileToClassName(f: File): String = { // HOPE YOU'RE HAPPY GUYS!!!! + /* __ + * __/|_/ /_ __ ______ ________/|_ + * | / __ \/ / / / __ `/ ___/ / + * /_ __/ / / / /_/ / /_/ (__ )_ __| + * |/ /_/ /_/\__,_/\__, /____/ |/ + * /____/ + */ val fileName = f.getName val baseName = fileName.lastIndexOf('.') match { case -1 => fileName |