Package

ammonite

util

Permalink

package util

Visibility
  1. Public
  2. All

Type Members

  1. case class Bind[T](name: String, value: T)(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T]) extends Product with Serializable

    Permalink

    Models a binding of a value to a typed name, and is passed into the REPL so it can re-create the bindings inside the REPL's scope

  2. case class Catching(handler: PartialFunction[Throwable, Failing]) extends Product with Serializable

    Permalink

    Fake for-comprehension generator to catch errors and turn them into Res.Failures

  3. trait CodeColors extends AnyRef

    Permalink
  4. case class Colors(prompt: Ref[Attrs], ident: Ref[Attrs], type: Ref[Attrs], literal: Ref[Attrs], prefix: Ref[Attrs], comment: Ref[Attrs], keyword: Ref[Attrs], selected: Ref[Attrs], error: Ref[Attrs], warning: Ref[Attrs]) extends Product with Serializable

    Permalink

    A set of colors used to highlight the miscellanious bits of the REPL.

    A set of colors used to highlight the miscellanious bits of the REPL. Re-used all over the place in PPrint, TPrint, syntax highlighting, command-echoes, etc. in order to keep things consistent

    prompt

    The command prompt

    ident

    Definition of top-level identifiers

    literal

    Strings, integers and other literal expressions

    prefix

    The Seq/Foo when printing a Seq(...) or case class Foo(...)

    selected

    The color of text selected in the line-editor

    error

    The color used to print error messages of all kinds

  5. class CompilationError extends Exception

    Permalink

    Exception for reporting script compilation failures

  6. case class Evaluated(wrapper: Seq[Name], imports: Imports, tag: String) extends Product with Serializable

    Permalink
  7. case class ImportData(fromName: Name, toName: Name, prefix: Seq[Name], importType: ImportType) extends Product with Serializable

    Permalink

    Represents the importing of a single name in the Ammonite REPL, of the form

    Represents the importing of a single name in the Ammonite REPL, of the form

    import $prefix.{$fromName => $toName}

    All imports are reduced to this form; import $prefix.$name is results in the fromName and toName being the same, while import $prefix._ or import $prefix.{foo, bar, baz} are split into multiple distinct ImportData objects.

    Note that imports can be of one of three distinct ImportTypes: importing a type, a term, or both. This lets us properly deal with shadowing correctly if we import the type and term of the same name from different places

  8. case class ImportTree(prefix: Seq[String], mappings: Option[ImportMapping], start: Int, end: Int) extends Product with Serializable

    Permalink
  9. class Imports extends AnyRef

    Permalink

    Represents the imports that occur before a piece of user code in the Ammonite REPL.

    Represents the imports that occur before a piece of user code in the Ammonite REPL. It's basically a Seq[ImportData], except we really want it to be always in a "canonical" form without shadowed/duplicate imports.

    Thus we only expose an apply method which performs this de-duplication, and a ++ operator that combines two sets of imports while performing de-duplication.

  10. case class Name(raw: String) extends Product with Serializable

    Permalink

    Represents a single identifier in Scala source code, e.g.

    Represents a single identifier in Scala source code, e.g. "scala" or "println" or "Hello-World".

    Holds the value "raw", with all special characters intact, e.g. "Hello-World". Can be used backticked e.g. "Hello-World", useful for embedding in Scala source code, or encoded e.g. "Hello$minusWorld", useful for accessing names as-seen-from the Java/JVM side of thigns

  11. case class Printer(out: (String) ⇒ Unit, warning: (String) ⇒ Unit, error: (String) ⇒ Unit, info: (String) ⇒ Unit) extends Product with Serializable

    Permalink

    Encapsulates the ways the Ammonite REPL prints things.

    Encapsulates the ways the Ammonite REPL prints things. Does not print a trailing newline by default; you have to add one yourself.

    out

    How you want it to print streaming fragments of stdout

    warning

    How you want it to print a compile warning

    error

    How you want it to print a compile error

    info

    How you want to print compile info logging. *Not* the same as out, which is used to print runtime output.

  12. trait Ref[T] extends StableRef[T]

    Permalink
  13. sealed abstract class Res[+T] extends AnyRef

    Permalink

    The result of a single pass through the ammonite REPL.

    The result of a single pass through the ammonite REPL. Results in a single T, or of one of a fixed number of failures that are common for anyone who is evaluating code via the REPL.

  14. trait StableRef[T] extends AnyRef

    Permalink

    Encapsulates a read-write cell that can be passed around

Value Members

  1. object Bind extends Serializable

    Permalink
  2. object Colors extends Serializable

    Permalink
  3. object Ex

    Permalink

    Nice pattern matching for chained exceptions

  4. object ImportData extends Serializable

    Permalink
  5. object ImportTree extends Serializable

    Permalink
  6. object Imports

    Permalink
  7. object Name extends Serializable

    Permalink
  8. object Ref

    Permalink
  9. object Res

    Permalink
  10. object Util

    Permalink

Ungrouped