package interactive
- Alphabetic
- Public
- All
Type Members
- trait CommentPreservingTypers extends Typers
This trait allows the IDE to have an instance of the PC that does not clear the comments table at every new typer run (those being many and close between in this context).
- trait CompilerControl extends AnyRef
Interface of interactive compiler to a client such as an IDE The model the presentation compiler consists of the following parts:
Interface of interactive compiler to a client such as an IDE The model the presentation compiler consists of the following parts:
unitOfFile: The map from sourcefiles to loaded units. A sourcefile/unit is loaded if it occurs in that map.
manipulated by: removeUnitOf, reloadSources.
A call to reloadSources will add the given sources to the loaded units, and start a new background compiler pass to compile all loaded units (with the indicated sources first). Each background compiler pass has its own typer run. The background compiler thread can be interrupted each time an AST node is completely typechecked in the following ways:
- by a new call to reloadSources. This starts a new background compiler pass with a new typer run. 2. by a call to askTypeTree. This starts a new typer run if the forceReload parameter = true 3. by a call to askTypeAt, askTypeCompletion, askScopeCompletion, askToDoFirst, askLinkPos, askLastType. 4. by raising an exception in the scheduler. 5. by passing a high-priority action wrapped in ask { ... }.
Actions under 1-3 can themselves be interrupted if they involve typechecking AST nodes. High-priority actions under 5 cannot; they always run to completion. So these high-priority actions should to be short.
Normally, an interrupted action continues after the interrupting action is finished. However, if the interrupting action created a new typer run, the interrupted action is aborted. If there's an outstanding response, it will be set to a Right value with a FreshRunReq exception.
- abstract class CondPickler[T] extends Pickler[T]
A subclass of Pickler can indicate whether a particular value can be pickled by instances of this class.
- trait ContextTrees extends AnyRef
- class FreshRunReq extends ControlThrowable
Signals a request for a fresh background compiler run.
Signals a request for a fresh background compiler run. Note: The object has to stay top-level so that the PresentationCompilerThread may access it.
- class Global extends nsc.Global with CompilerControl with ContextTrees with RichCompilationUnits with Picklers
The main class of the presentation compiler in an interactive environment such as an IDE
- trait InteractiveAnalyzer extends Analyzer
- abstract class InteractiveReporter extends Reporter
- class Lexer extends AnyRef
A simple lexer for tokens as they are used in JSON, plus parens
(
,)
Tokens understood are:A simple lexer for tokens as they are used in JSON, plus parens
(
,)
Tokens understood are:(
,)
,[
,]
,{
,}
,:
,,
,true
,false
,null
, strings (syntax as in JSON), integer numbers (syntax as in JSON: -?(0|\d+) floating point numbers (syntax as in JSON: -?(0|\d+)(\.\d+)?((e|E)(+|-)?\d+)?) The end of input is represented as its own token, EOF. Lexers can keep one token lookahead - abstract class LogReplay extends AnyRef
- class Logger extends LogReplay
- class MissingResponse extends Exception
- class NoSuchUnitError extends Exception
- abstract class Pickler[T] extends AnyRef
An abstract class for writing and reading Scala objects to and from a legible representation.
An abstract class for writing and reading Scala objects to and from a legible representation. The representation follows the following grammar:
Pickled = `true` | `false` | `null` | NumericLit | StringLit | Labelled | Pickled `,` Pickled Labelled = StringLit `(` Pickled? `)`
All ...Lit classes are as in JSON. @see scala.tools.nsc.io.Lexer
Subclasses of
Pickler
each can write and read individual classes of values.- T
the type of values handled by this pickler. These Picklers build on the work of Andrew Kennedy. They are most closely inspired by Iulian Dragos' picklers for Scala to XML. See: http://code.google.com/p/gdata-scala-client/wiki/DevelopersGuide
- trait Picklers extends AnyRef
- final class PresentationCompilerThread extends Thread
A presentation compiler thread.
A presentation compiler thread. This is a lightweight class, delegating most of its functionality to the compiler instance.
- class PrettyWriter extends Writer
- case class Problem(pos: Position, msg: String, severityLevel: Int) extends Product with Serializable
- class Replayer extends LogReplay
- class Response[T] extends AnyRef
Typical interaction, given a predicate <user-input>, a function <display>, and an exception handler <handle>:
Typical interaction, given a predicate <user-input>, a function <display>, and an exception handler <handle>:
val TIMEOUT = 100 // (milliseconds) or something like that val r = new Response() while (!r.isComplete && !r.isCancelled) { if (<user-input>) r.cancel() else r.get(TIMEOUT) match { case Some(Left(data)) => <display>(data) case Some(Right(exc)) => <handle>(exc) case None => } }
- trait RichCompilationUnits extends AnyRef
Deprecated Type Members
- trait RangePositions extends Positions with Trees with Positions
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) Use scala.reflect.internal.Positions
Value Members
- object CancelException extends Exception
- object Lexer
Companion object of class
Lexer
which defines tokens and some utility concepts used for tokens and lexers - object Main extends MainClass
The main class for NSC, a compiler for the programming language Scala.
- object NullLogger extends LogReplay
- object Pickler
- object REPL
Interface of interactive compiler to a client such as an IDE
- object ShutdownReq extends ControlThrowable
Signals a request for a shutdown of the presentation compiler.
Signals a request for a shutdown of the presentation compiler. Note: The object has to stay top-level so that the PresentationCompilerThread may access it.
The Scala compiler and reflection APIs.