Phasor 3.1.1
Stack VM based Programming Language
Loading...
Searching...
No Matches
ScriptingRuntime.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5#include <vector>
6
9namespace pulsar
10{
11
17{
18 public:
19 Interpreter(int argc, char *argv[], char *envp[]);
20 int run();
21
22 private:
23 struct Args
24 {
25 std::filesystem::path inputFile;
26 bool verbose = false;
27 int scriptArgc = 0;
28 char **scriptArgv = nullptr;
29 char **envp = nullptr;
30 std::filesystem::path program;
32
33 void parseArguments(int argc, char *argv[]);
34 void showHelp();
35
36 int runSource();
37 int runSourceString(const std::string &source, Phasor::VM &vm);
38
39 std::unique_ptr<Phasor::VM> createVm();
40};
41
42} // namespace pulsar
Virtual Machine.
Definition VM.hpp:30
int runSourceString(const std::string &source, Phasor::VM &vm)
void parseArguments(int argc, char *argv[])
std::unique_ptr< Phasor::VM > createVm()
Interpreter(int argc, char *argv[], char *envp[])
struct pulsar::Interpreter::Args m_args
The Pulsar Scripting Language.
Definition Compiler.cpp:13
std::filesystem::path inputFile
std::filesystem::path program