![]() |
ArkScript
A small, lisp-inspired, functional scripting language
|
Namespaces | |
| namespace | Builtins |
| namespace | bytecode |
| namespace | ieee754 |
| namespace | IR |
| namespace | Language |
Classes | |
| class | ASTLowerer |
| The ArkScript AST to IR compiler. More... | |
| class | BaseParser |
| struct | CharPred |
| class | Closure |
| Closure management. More... | |
| class | ClosureScope |
| A class to store fields captured by a closure. More... | |
| class | ConditionalExecutor |
| Handles Conditional macros. More... | |
| struct | Declaration |
| class | Dict |
| struct | EntityWithOffset |
| struct | ExecutionContext |
| struct | FilePos |
| struct | FilePosition |
| Describe a position in a given file ; handled by the BaseParser. More... | |
| struct | FileSpan |
| Describes a span for a node/atom in a file, its start position and end position. More... | |
| class | FunctionExecutor |
| Handles function macros. More... | |
| class | Future |
| struct | Import |
| class | ImportSolver |
| struct | InstLoc |
| class | IRCompiler |
| class | IROptimizer |
| struct | IsAlnum |
| struct | IsAlpha |
| struct | IsChar |
| struct | IsDigit |
| struct | IsEither |
| struct | IsHex |
| struct | IsInlineSpace |
| struct | IsNot |
| struct | IsSpace |
| struct | IsSymbol |
| class | LocalsLocator |
| class | Logger |
| class | MacroExecutor |
| A class that applies macros in a Node. More... | |
| class | MacroProcessor |
| The class handling the macros definitions and calls, given an AST. More... | |
| class | MacroScope |
| class | NameResolutionPass |
| struct | Namespace |
| class | NamespaceScope |
| class | Node |
| A node of an Abstract Syntax Tree for ArkScript. More... | |
| class | Optimizer |
| The ArkScript AST optimizer. More... | |
| struct | Package |
| class | Parser |
| class | Pass |
| An interface to describe compiler passes. More... | |
| class | ScopeResolver |
| class | ScopeView |
| A class to handle the VM scope more efficiently. More... | |
| class | SharedLibrary |
| Handling a shared library as an ArkScript VM plugin. More... | |
| class | StaticScope |
| class | SymbolExecutor |
| Handles Symbol macros. More... | |
| struct | type_uid |
| struct | type_uid_impl |
| class | utf8_char_t |
| struct | ValTableElem |
| A Compiler Value class helper to handle multiple types. More... | |
| struct | Word |
Typedefs | |
| using | PageAddr_t = uint16_t |
Functions | |
| bool | operator== (const Namespace &A, const Namespace &B) |
| bool | operator< (const Namespace &, const Namespace &) |
| const Node & | getTrueNode () |
| const Node & | getFalseNode () |
| const Node & | getNilNode () |
| const Node & | getListNode () |
| std::string | typeToString (const Node &node) noexcept |
| void | serializeToVecLE (std::integral auto number, std::vector< uint8_t > &out) |
| void | serializeToVecBE (std::integral auto number, std::vector< uint8_t > &out) |
| void | serializeOn2BytesToVecLE (std::integral auto number, std::vector< uint8_t > &out) |
| void | serializeOn2BytesToVecBE (std::integral auto number, std::vector< uint8_t > &out) |
| template<std::integral T> | |
| T | deserializeLE (std::vector< uint8_t >::const_iterator begin, std::vector< uint8_t >::const_iterator end) |
| template<std::integral T> | |
| T | deserializeBE (std::vector< uint8_t >::const_iterator begin, std::vector< uint8_t >::const_iterator end) |
| bool | operator< (const Closure &A, const Closure &B) |
| bool | operator== (const Dict &A, const Dict &B) |
| long | countOpenEnclosures (const std::string &line, char open, char close) |
| Count the open enclosure and its counterpart: (), {}, []. | |
| void | trimWhitespace (std::string &line) |
| Remove whitespaces at the start and end of a string. | |
| std::vector< std::string > | getAllKeywords () |
| Compute a list of all the language keywords and builtins. | |
| std::vector< std::pair< std::string, replxx::Replxx::Color > > | getColorPerKeyword () |
| Compute a list of pairs (word -> color) to be used for coloration by the REPL. | |
| replxx::Replxx::completions_t | hookCompletion (const std::vector< std::string > &words, const std::string &context, int &length) |
| void | hookColor (const std::vector< std::pair< std::string, replxx::Replxx::Color > > &words_colors, const std::string &context, replxx::Replxx::colors_t &colors) |
| replxx::Replxx::hints_t | hookHint (const std::vector< std::string > &words, const std::string &context, int &length, replxx::Replxx::Color &color) |
| bool | operator== (const Node &A, const Node &B) |
| bool | operator< (const Node &A, const Node &B) |
| std::optional< std::filesystem::path > | testExtensions (const std::filesystem::path &folder, const std::string &package_path) |
| bool | operator== (const ScopeView &A, const ScopeView &B) |
| bool | operator== (const Closure &A, const Closure &B) |
| bool | operator== (const ClosureScope &A, const ClosureScope &B) |
Variables | |
| Ark::internal::IsSpace | IsSpace |
| Ark::internal::IsInlineSpace | IsInlineSpace |
| Ark::internal::IsDigit | IsDigit |
| Ark::internal::IsHex | IsHex |
| Ark::internal::IsAlpha | IsAlpha |
| Ark::internal::IsAlnum | IsAlnum |
| Ark::internal::IsSymbol | IsSymbol |
| const IsChar | IsMinus ('-') |
| constexpr std::array< std::string_view, 11 > | nodeTypes |
| Node types as string, in the same order as the enum NodeType. | |
| constexpr std::array< std::string_view, 9 > | keywords |
| List of available keywords in ArkScript. | |
| constexpr std::array | InstructionNames |
| constexpr std::array< std::string_view, 7 > | errorKinds |
| constexpr std::array | colors |
| using Ark::internal::PageAddr_t = uint16_t |
Definition at line 26 of file Closure.hpp.
|
strong |
| Enumerator | |
|---|---|
| VM | |
| Module | |
| Scope | |
| Type | |
| Index | |
| Arity | |
| DivisionByZero | |
Definition at line 9 of file ErrorKind.hpp.
| enum Ark::internal::Instruction : uint8_t |
The different bytecodes are stored here.
FIRST_OPERATOR must be the same as the one in the operators table from the aforementioned file. Definition at line 26 of file Instructions.hpp.
|
strong |
The different keywords available.
| Enumerator | |
|---|---|
| Fun | |
| Let | |
| Mut | |
| Set | |
| If | |
| While | |
| Begin | |
| Import | |
| Del | |
Definition at line 74 of file Common.hpp.
|
strong |
The different node types available.
| Enumerator | |
|---|---|
| Symbol | |
| Capture | |
| Keyword | |
| String | |
| Number | |
| List | |
| Spread | |
| Field | |
| Macro | |
| Namespace | |
| Unused | |
Definition at line 43 of file Common.hpp.
|
strong |
| Enumerator | |
|---|---|
| Interpret | Escape sequences and |
| Raw | Keep all text as is without modifying it (useful for the code formatter) |
Definition at line 30 of file Parser.hpp.
|
strong |
Enumeration to keep track of the type of a Compiler Value.
| Enumerator | |
|---|---|
| Number | |
| String | |
| PageAddr | |
Definition at line 25 of file ValTableElem.hpp.
| long Ark::internal::countOpenEnclosures | ( | const std::string & | line, |
| char | open, | ||
| char | close ) |
Count the open enclosure and its counterpart: (), {}, [].
| line | data to operate on |
| open | the open char: (, { or [ |
| close | the closing char: ), } or ] |
Referenced by Ark::Repl::getCodeBlock().
| T Ark::internal::deserializeBE | ( | std::vector< uint8_t >::const_iterator | begin, |
| std::vector< uint8_t >::const_iterator | end ) |
Definition at line 56 of file IntegerSerializer.hpp.
Referenced by Ark::BytecodeReader::instLocations().
| T Ark::internal::deserializeLE | ( | std::vector< uint8_t >::const_iterator | begin, |
| std::vector< uint8_t >::const_iterator | end ) |
Definition at line 45 of file IntegerSerializer.hpp.
Referenced by Ark::BytecodeReader::values().
| std::vector< std::string > Ark::internal::getAllKeywords | ( | ) |
Compute a list of all the language keywords and builtins.
| std::vector< std::pair< std::string, replxx::Replxx::Color > > Ark::internal::getColorPerKeyword | ( | ) |
Compute a list of pairs (word -> color) to be used for coloration by the REPL.
| const Node & Ark::internal::getFalseNode | ( | ) |
Definition at line 360 of file Node.cpp.
References Symbol.
Referenced by Ark::internal::MacroProcessor::evaluate().
| const Node & Ark::internal::getListNode | ( | ) |
Definition at line 372 of file Node.cpp.
References Symbol.
Referenced by Ark::internal::FunctionExecutor::applyMacro(), Ark::internal::MacroProcessor::evaluate(), and Ark::internal::FunctionExecutor::unify().
| const Node & Ark::internal::getNilNode | ( | ) |
Definition at line 366 of file Node.cpp.
References Symbol.
Referenced by Ark::internal::ConditionalExecutor::applyMacro(), and Ark::internal::MacroProcessor::evaluate().
| const Node & Ark::internal::getTrueNode | ( | ) |
Definition at line 354 of file Node.cpp.
References Symbol.
Referenced by Ark::internal::MacroProcessor::evaluate().
| void Ark::internal::hookColor | ( | const std::vector< std::pair< std::string, replxx::Replxx::Color > > & | words_colors, |
| const std::string & | context, | ||
| replxx::Replxx::colors_t & | colors ) |
Referenced by Ark::Repl::cuiSetup().
| replxx::Replxx::completions_t Ark::internal::hookCompletion | ( | const std::vector< std::string > & | words, |
| const std::string & | context, | ||
| int & | length ) |
Referenced by Ark::Repl::cuiSetup().
| replxx::Replxx::hints_t Ark::internal::hookHint | ( | const std::vector< std::string > & | words, |
| const std::string & | context, | ||
| int & | length, | ||
| replxx::Replxx::Color & | color ) |
Referenced by Ark::Repl::cuiSetup().
Definition at line 88 of file Closure.hpp.
Definition at line 27 of file Namespace.hpp.
Definition at line 41 of file Closure.cpp.
|
noexcept |
Definition at line 38 of file ClosureScope.cpp.
Definition at line 21 of file Namespace.hpp.
References Ark::internal::Namespace::is_glob, Ark::internal::Namespace::name, and Ark::internal::Namespace::with_prefix.
Referenced by Ark::internal::Dict::Dict().
Definition at line 116 of file ScopeView.cpp.
| void Ark::internal::serializeOn2BytesToVecBE | ( | std::integral auto | number, |
| std::vector< uint8_t > & | out ) |
Definition at line 37 of file IntegerSerializer.hpp.
Referenced by Ark::internal::IRCompiler::compile(), Ark::internal::IRCompiler::pushFileHeader(), Ark::internal::IRCompiler::pushFilenameTable(), Ark::internal::IRCompiler::pushInstLocTable(), Ark::internal::IRCompiler::pushSymbolTable(), and Ark::internal::IRCompiler::pushValueTable().
| void Ark::internal::serializeOn2BytesToVecLE | ( | std::integral auto | number, |
| std::vector< uint8_t > & | out ) |
Definition at line 30 of file IntegerSerializer.hpp.
| void Ark::internal::serializeToVecBE | ( | std::integral auto | number, |
| std::vector< uint8_t > & | out ) |
Definition at line 18 of file IntegerSerializer.hpp.
Referenced by Ark::internal::IRCompiler::pushInstLocTable().
| void Ark::internal::serializeToVecLE | ( | std::integral auto | number, |
| std::vector< uint8_t > & | out ) |
Definition at line 10 of file IntegerSerializer.hpp.
Referenced by Ark::internal::IRCompiler::pushValueTable().
| std::optional< std::filesystem::path > Ark::internal::testExtensions | ( | const std::filesystem::path & | folder, |
| const std::string & | package_path ) |
Definition at line 190 of file ImportSolver.cpp.
Referenced by Ark::internal::ImportSolver::findFile().
| void Ark::internal::trimWhitespace | ( | std::string & | line | ) |
Remove whitespaces at the start and end of a string.
| line | string modified in place |
Referenced by Ark::Repl::getLine().
|
inlinenoexcept |
| node |
Definition at line 264 of file Node.hpp.
References nodeTypes, and Symbol.
Referenced by Ark::internal::ASTLowerer::compileExpression(), Ark::internal::ASTLowerer::compileFunction(), Ark::internal::ASTLowerer::compileLetMutSet(), Ark::internal::MacroProcessor::evaluate(), and Ark::internal::MacroProcessor::registerFuncDef().
|
constexpr |
Definition at line 8 of file Logger.cpp.
Referenced by Ark::Repl::cuiSetup(), and Ark::internal::Logger::Logger().
|
constexpr |
Definition at line 20 of file ErrorKind.hpp.
Referenced by Ark::VM::throwVMError().
|
constexpr |
Definition at line 431 of file Instructions.hpp.
Referenced by Ark::BytecodeReader::display(), and Ark::internal::IRCompiler::dumpToStream().
| Ark::internal::IsAlnum Ark::internal::IsAlnum |
| Ark::internal::IsAlpha Ark::internal::IsAlpha |
| Ark::internal::IsDigit Ark::internal::IsDigit |
| Ark::internal::IsHex Ark::internal::IsHex |
| Ark::internal::IsInlineSpace Ark::internal::IsInlineSpace |
| const IsChar Ark::internal::IsMinus('-') | ( | '-' | ) |
Referenced by Ark::internal::BaseParser::signedNumber().
| Ark::internal::IsSpace Ark::internal::IsSpace |
| Ark::internal::IsSymbol Ark::internal::IsSymbol |
|
constexpr |
List of available keywords in ArkScript.
Definition at line 88 of file Common.hpp.
Referenced by Formatter::format(), Formatter::formatVariable(), and Ark::internal::Node::repr().
|
constexpr |
Node types as string, in the same order as the enum NodeType.
Definition at line 59 of file Common.hpp.
Referenced by JsonCompiler::_compile(), Ark::internal::Parser::letMutSet(), and typeToString().