ArkScript
A small, fast, functional and scripting language for video games
Common.hpp File Reference

Common code for the compiler. More...

#include <array>
#include <string_view>
#include <vector>
#include <cinttypes>
Include dependency graph for Common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Ark
 
namespace  Ark::internal
 
namespace  Ark::internal::Language
 

Typedefs

using Ark::bytecode_t = std::vector<uint8_t>
 

Enumerations

enum class  Ark::internal::NodeType {
  Ark::internal::Symbol , Ark::internal::Capture , Ark::internal::Keyword , Ark::internal::String ,
  Ark::internal::Number , Ark::internal::List , Ark::internal::Spread , Ark::internal::Field ,
  Ark::internal::Macro , Ark::internal::Unused
}
 The different node types available. More...
 
enum class  Ark::internal::Keyword {
  Ark::internal::Fun , Ark::internal::Let , Ark::internal::Mut , Ark::internal::Set ,
  Ark::internal::If , Ark::internal::While , Ark::internal::Begin , Ark::internal::Import ,
  Ark::internal::Del
}
 The different keywords available. More...
 

Variables

constexpr std::array< std::string_view, 10 > Ark::internal::nodeTypes
 Node types as string, in the same order as the enum NodeType.
 
constexpr std::array< std::string_view, 9 > Ark::internal::keywords
 List of available keywords in ArkScript.
 
constexpr std::string_view Ark::internal::Language::AppendInPlace = "append!"
 
constexpr std::string_view Ark::internal::Language::ConcatInPlace = "concat!"
 
constexpr std::string_view Ark::internal::Language::PopInPlace = "pop!"
 
constexpr std::array Ark::internal::Language::UpdateRef
 All the builtins that modify in place a variable.
 
constexpr std::array< std::string_view, 7 > Ark::internal::Language::listInstructions
 
constexpr std::string_view Ark::internal::Language::SysArgs = "sys:args"
 
constexpr std::string_view Ark::internal::Language::SysPlatform = "sys:platform"
 
constexpr std::string_view Ark::internal::Language::And = "and"
 
constexpr std::string_view Ark::internal::Language::Or = "or"
 
constexpr std::string_view Ark::internal::Language::Symcat = "$symcat"
 
constexpr std::string_view Ark::internal::Language::Argcount = "$argcount"
 
constexpr std::string_view Ark::internal::Language::Repr = "$repr"
 
constexpr std::string_view Ark::internal::Language::Paste = "$paste"
 
constexpr std::array Ark::internal::Language::macros
 
constexpr std::array< std::string_view, 23 > Ark::internal::Language::operators
 

Detailed Description

Common code for the compiler.

Author
Alexandre Plateau (lexpl.nosp@m.t.de.nosp@m.v@gma.nosp@m.il.c.nosp@m.om)
Version
0.4
Date
2021-10-02

Definition in file Common.hpp.