ArkScript
A small, fast, functional and scripting language for video games
|
Namespaces | |
namespace | internal |
namespace | literals |
namespace | types |
namespace | Utils |
Classes | |
class | AssertionFailed |
An assertion error, only triggered from ArkScript code through (assert expr error-message) More... | |
class | BytecodeReader |
This class is just a helper to. More... | |
class | CompilationError |
CompilationError thrown by the compiler. More... | |
class | Compiler |
The ArkScript bytecode compiler. More... | |
class | JsonCompiler |
class | MacroProcessingError |
MacroProcessingError thrown by the compiler. More... | |
struct | mapping |
class | OptimizerError |
OptimizerError thrown by the AST optimizer. More... | |
class | ParseError |
ParseError thrown by the parser. More... | |
class | PowError |
A pow error triggered when we can't do a pow b. More... | |
class | Repl |
class | State |
Ark state to handle the dirty job of loading and compiling ArkScript code. More... | |
class | SyntaxError |
SyntaxError thrown by the lexer. More... | |
class | TypeError |
A type error triggered when types don't match. More... | |
class | UserType |
A class to be use C++ objects in ArkScript. More... | |
class | Value |
class | VM |
The ArkScript virtual machine, executing ArkScript bytecode. More... | |
class | ZeroDivisionError |
A special zero division error triggered when a number is divided by 0. More... | |
Typedefs | |
using | bytecode_t = std::vector< uint8_t > |
Enumerations | |
enum class | BytecodeSegment { All , Symbols , Values , Code , HeadersOnly } |
enum class | ValueType { List = 0 , Number = 1 , String = 2 , PageAddr = 3 , CProc = 4 , Closure = 5 , User = 6 , Nil = 7 , True = 8 , False = 9 , Undefined = 10 , Reference = 11 , InstPtr = 12 , Any = 99 } |
Functions | |
template<typename... Args> | |
std::string | string_format (const std::string &format, Args &&... args) |
bool | operator== (const UserType &A, const UserType &B) noexcept |
bool | operator< (const UserType &A, const UserType &B) noexcept |
std::ostream & | operator<< (std::ostream &os, const UserType &A) noexcept |
Variables | |
constexpr uint16_t | FeatureRemoveUnusedVars = 1 << 4 |
constexpr uint16_t | FeatureShowWarnings = 1 << 5 |
constexpr uint16_t | DefaultFeatures = FeatureRemoveUnusedVars | FeatureShowWarnings |
constexpr std::size_t | VMStackSize = 8192 |
const std::vector< std::string > | KeywordsDict |
const std::vector< std::pair< std::string, Replxx::Color > > | ColorsRegexDict |
const std::array< std::string, 13 > | types_to_str |
const Value | Nil = Value(ValueType::Nil) |
ArkScript Nil value. | |
const Value | False = Value(ValueType::False) |
ArkScript False value. | |
const Value | True = Value(ValueType::True) |
ArkScript True value. | |
using Ark::bytecode_t = typedef std::vector<uint8_t> |
Definition at line 22 of file Common.hpp.
|
strong |
Enumerator | |
---|---|
All | |
Symbols | |
Values | |
Code | |
HeadersOnly |
Definition at line 27 of file BytecodeReader.hpp.
|
strong |
Definition at line 16 of file UserType.cpp.
|
noexcept |
Definition at line 21 of file UserType.cpp.
Definition at line 11 of file UserType.cpp.
std::string Ark::string_format | ( | const std::string & | format, |
Args &&... | args | ||
) |
Definition at line 34 of file JsonCompiler.cpp.
Referenced by Ark::JsonCompiler::_compile().
const std::vector<std::pair<std::string, Replxx::Color> > Ark::ColorsRegexDict |
Definition at line 58 of file ConsoleStyle.hpp.
Referenced by Ark::Repl::cui_setup().
|
constexpr |
Definition at line 52 of file Constants.hpp.
Referenced by main().
|
constexpr |
Definition at line 48 of file Constants.hpp.
Referenced by Ark::internal::Optimizer::feed(), and main().
|
constexpr |
Definition at line 49 of file Constants.hpp.
Referenced by Ark::Compiler::compilerWarning().
const std::vector<std::string> Ark::KeywordsDict |
Definition at line 21 of file ConsoleStyle.hpp.
Referenced by Ark::Repl::cui_setup().
const std::array<std::string, 13> Ark::types_to_str |
Definition at line 58 of file Value.hpp.
Referenced by Ark::VM::safeRun(), and Ark::types::typeListToString().
|
constexpr |
Definition at line 54 of file Constants.hpp.
Referenced by Ark::VM::safeRun().