REPL - Commands
Last updated
Last updated
SkyLine also has built in REPL commands that do not count as direct code to be executed. This happens by first checking if every bit of input is directly matching a REPL command and if so to return once executed. The commands allow you to do many things such as viewing, exporting and replaying events. This module will explain specific commands.
The REPL_ENVIRONMENT
command allows you to inspect and view the current environment within the current project. REPL is designed to only read specific amounts of input and it is not designed to develop full projects, however, in some cases it can be beneficial to view the environment to make sure everything is going as planned. The command to view an environment will look something like the one below.
This can definitely help you during test cases especially if you are testing imports for a module and do not always want to setup project environments.
The save command allows you to take the given workspace and save it to a temporary file. In the case of you coming across a issue with the code and you want to clean the REPL you can tell it to save the environment that you are currently in using the command REPL_SAVE
.
Saving an environment if successful will look like the following output
This command and event will replay the last line of code that you have given to the REPL or the last line of code that was executed within the environment. If you have a command like 10.Outln()
and you want to replay it you can do so using the command REPL_REPLAY_LAST
. The execution of this looks like the following.
It is important to note that this will not store the result in the code environment.
This command is kind of a wild thing to use but it is similar to replay last. Instead of replaying the last command it will replay everything within the environment or code environment but never save it. The following image shows an environment being replayed.
This will just show you the basic REPL settings, depending on the version and leaf of SkyLine ( Referring to the family member of the SkyLine language tree ) this can show anything from active thread count to user and OS info that the REPL uses.