dotty.tools.repl
Members list
Type members
Classlikes
Attributes
- Supertypes
An ambiguous prefix that matches multiple commands
An ambiguous prefix that matches multiple commands
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
A command is on the format:
A command is on the format:
:commandName <optional arguments...>
The Command
trait denotes these commands
Attributes
- Supertypes
- Known subtypes
-
class AmbiguousCommandclass DocOfobject Helpobject Importsclass Loadobject Quitclass Resetclass Settingsclass TypeOfclass UnknownCommandShow all
A command that is used to display the documentation associated with the given expression.
A command that is used to display the documentation associated with the given expression.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
:help
shows the different commands implemented by the Dotty repl
:help
shows the different commands implemented by the Dotty repl
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
- Self type
-
Help.type
:imports
lists the imports that have been explicitly imported during the session
:imports
lists the imports that have been explicitly imported during the session
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
- Self type
-
Imports.type
Attributes
- Supertypes
:load <path>
interprets a scala file as if entered line-by-line into the REPL
:load <path>
interprets a scala file as if entered line-by-line into the REPL
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
Parsed result is simply a newline
Parsed result is simply a newline
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ParseResultclass Objecttrait Matchableclass AnyShow all
- Self type
-
Newline.type
A parsing result from string input
A parsing result from string input
Attributes
Attributes
- Companion
- trait
- Supertypes
- Self type
-
ParseResult.type
An error free parsing resulting in a list of untyped trees
An error free parsing resulting in a list of untyped trees
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ParseResultclass Objecttrait Matchableclass AnyShow all
:quit
exits the repl
:quit
exits the repl
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
- Self type
-
Quit.type
Attributes
- Supertypes
- Self type
-
ReplCommand.type
Attributes
- Supertypes
This subclass of Compiler
is adapted for use in the REPL.
This subclass of Compiler
is adapted for use in the REPL.
- compiles parsed expression in the current REPL state:
- adds the appropriate imports in scope
- wraps expressions into a dummy object
- provides utility to query the type of an expression
- provides utility to query the documentation of an expression
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
- Self type
-
ReplCompiler.type
A phase that assembles wrapped parse trees from user input.
Reset the session to the initial state from when the repl program was started
Reset the session to the initial state from when the repl program was started
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
A JSR 223 (Scripting API) compatible wrapper around the REPL for improved interoperability with software that supports it.
A JSR 223 (Scripting API) compatible wrapper around the REPL for improved interoperability with software that supports it.
It works by instantiating a new script engine through the script engine manager. The script engine provides a eval method to evaluate scripts in string form. Example use:
val m = new javax.script.ScriptEngineManager() val e = m.getEngineByName("scala") println(e.eval("42"))
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
- Self type
-
ScriptEngine.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
ctrl-c
obtained from input string
ctrl-c
obtained from input string
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait ParseResultclass Objecttrait Matchableclass AnyShow all
- Self type
-
SigKill.type
The state of the REPL contains necessary bindings instead of having to have mutation
The state of the REPL contains necessary bindings instead of having to have mutation
The compiler in the REPL needs to do some wrapping in order to compile valid code. This wrapping occurs when a single MemberDef
that cannot be top-level needs to be compiled. In order to do this, we need some unique identifier for each of these wrappers. That identifier is objectIndex
.
Free expressions such as 1 + 1
needs to have an assignment in order to be of use. These expressions are therefore given a identifier on the format resX
where X
starts at 0 and each new expression that needs an identifier is given the increment of the old identifier. This identifier is valIndex
.
Value parameters
- context
-
the latest compiler context
- imports
-
a map from object index to the list of user defined imports
- invalidObjectIndexes
-
the set of object indexes that failed to initialize
- objectIndex
-
the index of the next wrapper
- valIndex
-
the index of next value binding for free expressions
Attributes
- Supertypes
A parsing result containing syntax errors
A parsing result containing syntax errors
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait ParseResultclass Objecttrait Matchableclass AnyShow all
To find out the type of an expression you may simply do:
To find out the type of an expression you may simply do:
scala> :type (1 * 54).toString
String
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all
An unknown command that will not be handled by the REPL
An unknown command that will not be handled by the REPL
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Commandtrait ParseResultclass Objecttrait Matchableclass AnyShow all