Namespace worldlang
Namespace for scripting language stuff.
Classes
Type | Name |
---|---|
class | ProgramExecutor Class that manages program execution. |
struct | Unit |
struct | add |
struct | add_a |
struct | assignment |
struct | code_block |
struct | comment |
struct | comp |
struct | comp_a |
struct | element |
struct | expression |
struct | expression_list |
struct | function |
struct | identifier |
struct | identifier_list |
struct | mul |
struct | mul_a |
struct | number |
struct | op_prio_add |
struct | op_prio_comp |
struct | op_prio_mul |
struct | program |
struct | statement |
struct | statement_list |
struct | string |
Public Types
Type | Name |
---|---|
typedef tao::pegtl::parse_tree::selector< Rule, tao::pegtl::parse_tree::store_content::on< number, string, function, identifier, identifier_list, expression, expression_list, statement, statement_list, code_block, program, assignment, op_prio_add, op_prio_mul, op_prio_comp >, tao::pegtl::parse_tree::fold_one::on< add_a, mul_a > > | selector |
Public Functions
Type | Name |
---|---|
std::vector< Unit > | parse_to_code (std::string program) |
std::string | stripWhitespace (const std::string & input) |
Public Types Documentation
typedef selector
using selector = tao::pegtl::parse_tree::selector< Rule, tao::pegtl::parse_tree::store_content::on< number, string, function, identifier, identifier_list, expression, expression_list, statement, statement_list, code_block, program, assignment, op_prio_add, op_prio_mul, op_prio_comp >, tao::pegtl::parse_tree::fold_one::on< add_a, mul_a > >;
Selector for tree generation This is used by PEGTL's parse_tree function to determine which nodes are kept, which are folded into their parent when possible, and which are ignored (these are not listed here).
Public Functions Documentation
function parse_to_code
std::vector< Unit > worldlang::parse_to_code (
std::string program
)
Converts a program string into code units using PEGTL
function stripWhitespace
std::string worldlang::stripWhitespace (
const std::string & input
)
function to strip whitespace
The documentation for this class was generated from the following file source/Worlds/Language.hpp