Phasor 3.3.0
Stack VM based Programming Language
Loading...
Searching...
No Matches
Phasor::StdLib Class Reference

Phasor Standard library. More...

#include <StdLib.hpp>

Static Public Member Functions

static void registerFunctions (VM &vm)
static void checkArgCount (const std::vector< Value > &args, size_t minimumArguments, const std::string &name, bool allowMoreArguments=false)
static void registerFunctions (VM &vm)
static void checkArgCount (const std::vector< Value > &args, size_t minimumArguments, const std::string &name, bool allowMoreArguments=false)

Static Public Attributes

static char ** argv = nullptr
 Command line arguments.
static int argc = 0
 Number of command line arguments.

Private Types

enum class  dupenv_ret {
  Success = 0 , InvalidInput = 1 , NotFound = 2 , Success = 0 ,
  InvalidInput = 1 , NotFound = 2
}
enum class  dupenv_ret {
  Success = 0 , InvalidInput = 1 , NotFound = 2 , Success = 0 ,
  InvalidInput = 1 , NotFound = 2
}

Static Private Member Functions

static bool std_import (const std::vector< Value > &args, VM *vm)
static Value std_assert (const std::vector< Value > &args, VM *vm)
static dupenv_ret dupenv (PhsString &out, const char *name)
static void registerMetaFunctions (VM *vm)
static void registerMemoryFunctions (VM *vm)
static void registerMathFunctions (VM *vm)
static void registerRandomFunctions (VM *vm)
static void registerStringFunctions (VM *vm)
static void registerTypeConvFunctions (VM *vm)
static void registerFileFunctions (VM *vm)
static void registerSysFunctions (VM *vm)
static void registerIOFunctions (VM *vm)
static void registerArrayFunctions (VM *vm)
static i64 meta_operation (const std::vector< Value > &args, VM *vm)
static Value meta_stack_run (const std::vector< Value > &args, VM *vm)
static PhsString meta_get_version (const std::vector< Value > &args, VM *vm)
static Value var_free (const std::vector< Value > &args, VM *vm)
 Free a variable.
static f64 math_sqrt (const std::vector< Value > &args, VM *vm)
 Square root.
static f64 math_pow (const std::vector< Value > &args, VM *vm)
 Power.
static Value math_abs (const std::vector< Value > &args, VM *vm)
 Absolute value.
static f64 math_floor (const std::vector< Value > &args, VM *vm)
 Floor.
static f64 math_ceil (const std::vector< Value > &args, VM *vm)
 Ceiling.
static f64 math_round (const std::vector< Value > &args, VM *vm)
 Round.
static Value math_min (const std::vector< Value > &args, VM *vm)
 Minimum.
static Value math_max (const std::vector< Value > &args, VM *vm)
 Maximum.
static f64 math_log (const std::vector< Value > &args, VM *vm)
 Natural logarithm.
static f64 math_exp (const std::vector< Value > &args, VM *vm)
 Exponential.
static f64 math_sin (const std::vector< Value > &args, VM *vm)
 Sine.
static f64 math_cos (const std::vector< Value > &args, VM *vm)
 Cosine.
static f64 math_tan (const std::vector< Value > &args, VM *vm)
 Tangent.
static PhsString file_absolute (const std::vector< Value > &args, VM *vm)
 Get full path to relative path.
static Value file_read (const std::vector< Value > &args, VM *vm)
 Read file.
static bool file_write (const std::vector< Value > &args, VM *vm)
 Write to file.
static bool file_exists (const std::vector< Value > &args, VM *vm)
 Check if file exists.
static PhsString file_read_line (const std::vector< Value > &args, VM *vm)
 Read a line from file.
static bool file_write_line (const std::vector< Value > &args, VM *vm)
 Write a line to file.
static bool file_append (const std::vector< Value > &args, VM *vm)
 Append to file.
static bool file_delete (const std::vector< Value > &args, VM *vm)
 Delete file.
static bool file_rename (const std::vector< Value > &args, VM *vm)
 Rename file.
static Value file_current_directory (const std::vector< Value > &args, VM *vm)
 Get/set working directory.
static bool file_copy (const std::vector< Value > &args, VM *vm)
 Copy file.
static bool file_move (const std::vector< Value > &args, VM *vm)
 Move file.
static bool file_property_edit (const std::vector< Value > &args, VM *vm)
static i64 file_property_get (const std::vector< Value > &args, VM *vm)
static bool file_create (const std::vector< Value > &args, VM *vm)
static Value file_read_directory (const std::vector< Value > &args, VM *vm)
static bool file_create_directory (const std::vector< Value > &args, VM *vm)
static bool file_remove_directory (const std::vector< Value > &args, VM *vm)
static PhsString file_join_path (const std::vector< Value > &args, VM *vm)
static PhsString file_stem (const std::vector< Value > &args, VM *vm)
 Get the stem of a path.
static PhsString file_filename (const std::vector< Value > &args, VM *vm)
 Get the filename.
static PhsString file_extension (const std::vector< Value > &args, VM *vm)
 Get the extension of a path.
static bool file_is_directory (const std::vector< Value > &args, VM *vm)
 Check if path is directory.
static PhsString file_parent (const std::vector< Value > &args, VM *vm)
 Get the parent of a path.
static i64 file_get_size (const std::vector< Value > &args, VM *vm)
static i64 sys_get_free_memory (const std::vector< Value > &args, VM *vm)
 Get current free memory.
static Value sys_wait_for_input (const std::vector< Value > &args, VM *vm)
 Wait for input.
static Value sys_shell (const std::vector< Value > &args, VM *vm)
 Run a shell command.
static i64 sys_fork (const std::vector< Value > &args, VM *vm)
 Run a native program.
static i64 sys_fork_detached (const std::vector< Value > &args, VM *vm)
 Run a native program detached.
static Value sys_crash (const std::vector< Value > &args, VM *vm)
 Crash the VM / Program.
static Value sys_reset (const std::vector< Value > &args, VM *vm)
 Reset the VM.
static i64 sys_pid (const std::vector< Value > &args, VM *vm)
 Get the current process ID.
static PhsString sys_os (const std::vector< Value > &args, VM *vm)
 Get the current OS.
static Value sys_isatty (const std::vector< Value > &args, VM *vm)
 Check if the current output is a terminal.
static Value sys_env (const std::vector< Value > &args, VM *vm)
 Get the current environment variables.
static Value sys_argv (const std::vector< Value > &args, VM *vm)
 Get the current command line arguments – deprecated, use sys_args() instead.
static i64 sys_argc (const std::vector< Value > &args, VM *vm)
 Get the current number of command line arguments – deprecated, use len(sys_args()) instead.
static Value sys_args (const std::vector< Value > &args, VM *vm)
 Get args array.
static f64 sys_time (const std::vector< Value > &args, VM *vm)
 Current time.
static Value sys_time_formatted (const std::vector< Value > &args, VM *vm)
 Current time formatted.
static Value sys_sleep (const std::vector< Value > &args, VM *vm)
 Sleep for a specified amount of time.
static Value sys_shutdown (const std::vector< Value > &args, VM *vm)
 Shutdown the VM.
static i64 to_int (const std::vector< Value > &args, VM *vm)
 Convert to integer.
static f64 to_float (const std::vector< Value > &args, VM *vm)
 Convert to float.
static PhsString to_string (const std::vector< Value > &args, VM *vm)
 Convert to string.
static bool to_bool (const std::vector< Value > &args, VM *vm)
 Convert to boolean.
static i64 array_length (const std::vector< Value > &args, VM *vm)
 Get array length.
static Value array_push (const std::vector< Value > &args, VM *vm)
 Push to array.
static Value array_pop (const std::vector< Value > &args, VM *vm)
 Pop from array.
static Value array_insert (const std::vector< Value > &args, VM *vm)
 Insert into array.
static Value array_resize (const std::vector< Value > &args, VM *vm)
 Resize array.
static Value rand_seed (const std::vector< Value > &args, VM *vm)
 Seed the random number generator.
static i64 rand_next_range (const std::vector< Value > &args, VM *vm)
 Get a random number in range.
static f64 rand_next_float (const std::vector< Value > &args, VM *vm)
 Get a random float (technically a f64 at a low level).
static i64 str_find (const std::vector< Value > &args, VM *vm)
 Find string in string.
static i64 str_len (const std::vector< Value > &args, VM *vm)
 Get string length.
static Value str_char_at (const std::vector< Value > &args, VM *vm)
 Get character at index.
static Value str_substr (const std::vector< Value > &args, VM *vm)
 Get substring.
static PhsString str_concat (const std::vector< Value > &args, VM *vm)
 Concatenate strings.
static PhsString str_upper (const std::vector< Value > &args, VM *vm)
 Convert to uppercase.
static PhsString str_lower (const std::vector< Value > &args, VM *vm)
 Convert to lowercase.
static Value str_starts_with (const std::vector< Value > &args, VM *vm)
 Check if string starts with.
static Value str_ends_with (const std::vector< Value > &args, VM *vm)
 Check if string ends with.
static i64 sb_new (const std::vector< Value > &args, VM *vm)
 Create new string builder.
static Value sb_append (const std::vector< Value > &args, VM *vm)
 Append to string builder.
static PhsString sb_to_string (const std::vector< Value > &args, VM *vm)
 Convert string builder to string.
static Value sb_clear (const std::vector< Value > &args, VM *vm)
 Clear string builder.
static PhsString sb_free (const std::vector< Value > &args, VM *vm)
 Free string builder.
static PhsString io_c_format (const std::vector< Value > &args, VM *vm)
 Format string.
static Value io_clear (const std::vector< Value > &args, VM *vm)
 Clear the console.
static PhsString io_prints (const std::vector< Value > &args, VM *vm)
 Print string without newline.
static PhsString io_printf (const std::vector< Value > &args, VM *vm)
 Print formatted string.
static PhsString io_puts (const std::vector< Value > &args, VM *vm)
 Print string with newline.
static PhsString io_putf (const std::vector< Value > &args, VM *vm)
 Print formatted string with newline.
static Value io_gets (const std::vector< Value > &args, VM *vm)
 Get string.
static PhsString io_putf_error (const std::vector< Value > &args, VM *vm)
 Print formatted string with newline to error output.
static PhsString io_puts_error (const std::vector< Value > &args, VM *vm)
 Print string with newline to error output.
static bool std_import (const std::vector< Value > &args, VM *vm)
static Value std_assert (const std::vector< Value > &args, VM *vm)
static dupenv_ret dupenv (PhsString &out, const char *name)
static void registerMetaFunctions (VM *vm)
static void registerMemoryFunctions (VM *vm)
static void registerMathFunctions (VM *vm)
static void registerRandomFunctions (VM *vm)
static void registerStringFunctions (VM *vm)
static void registerTypeConvFunctions (VM *vm)
static void registerFileFunctions (VM *vm)
static void registerSysFunctions (VM *vm)
static void registerIOFunctions (VM *vm)
static i64 meta_operation (const std::vector< Value > &args, VM *vm)
static Value meta_stack_run (const std::vector< Value > &args, VM *vm)
static PhsString meta_get_version (const std::vector< Value > &args, VM *vm)
static Value var_free (const std::vector< Value > &args, VM *vm)
 Free a variable.
static f64 math_sqrt (const std::vector< Value > &args, VM *vm)
 Square root.
static f64 math_pow (const std::vector< Value > &args, VM *vm)
 Power.
static Value math_abs (const std::vector< Value > &args, VM *vm)
 Absolute value.
static f64 math_floor (const std::vector< Value > &args, VM *vm)
 Floor.
static f64 math_ceil (const std::vector< Value > &args, VM *vm)
 Ceiling.
static f64 math_round (const std::vector< Value > &args, VM *vm)
 Round.
static Value math_min (const std::vector< Value > &args, VM *vm)
 Minimum.
static Value math_max (const std::vector< Value > &args, VM *vm)
 Maximum.
static f64 math_log (const std::vector< Value > &args, VM *vm)
 Natural logarithm.
static f64 math_exp (const std::vector< Value > &args, VM *vm)
 Exponential.
static f64 math_sin (const std::vector< Value > &args, VM *vm)
 Sine.
static f64 math_cos (const std::vector< Value > &args, VM *vm)
 Cosine.
static f64 math_tan (const std::vector< Value > &args, VM *vm)
 Tangent.
static PhsString file_absolute (const std::vector< Value > &args, VM *vm)
 Get full path to relative path.
static Value file_read (const std::vector< Value > &args, VM *vm)
 Read file.
static bool file_write (const std::vector< Value > &args, VM *vm)
 Write to file.
static bool file_exists (const std::vector< Value > &args, VM *vm)
 Check if file exists.
static PhsString file_read_line (const std::vector< Value > &args, VM *vm)
 Read a line from file.
static bool file_write_line (const std::vector< Value > &args, VM *vm)
 Write a line to file.
static bool file_append (const std::vector< Value > &args, VM *vm)
 Append to file.
static bool file_delete (const std::vector< Value > &args, VM *vm)
 Delete file.
static bool file_rename (const std::vector< Value > &args, VM *vm)
 Rename file.
static Value file_current_directory (const std::vector< Value > &args, VM *vm)
 Get/set working directory.
static bool file_copy (const std::vector< Value > &args, VM *vm)
 Copy file.
static bool file_move (const std::vector< Value > &args, VM *vm)
 Move file.
static bool file_property_edit (const std::vector< Value > &args, VM *vm)
static i64 file_property_get (const std::vector< Value > &args, VM *vm)
static bool file_create (const std::vector< Value > &args, VM *vm)
static Value file_read_directory (const std::vector< Value > &args, VM *vm)
static bool file_create_directory (const std::vector< Value > &args, VM *vm)
static bool file_remove_directory (const std::vector< Value > &args, VM *vm)
static PhsString file_join_path (const std::vector< Value > &args, VM *vm)
static PhsString file_stem (const std::vector< Value > &args, VM *vm)
 Get the stem of a path.
static PhsString file_filename (const std::vector< Value > &args, VM *vm)
 Get the filename.
static PhsString file_extension (const std::vector< Value > &args, VM *vm)
 Get the extension of a path.
static bool file_is_directory (const std::vector< Value > &args, VM *vm)
 Check if path is directory.
static PhsString file_parent (const std::vector< Value > &args, VM *vm)
 Get the parent of a path.
static i64 file_get_size (const std::vector< Value > &args, VM *vm)
static i64 sys_get_free_memory (const std::vector< Value > &args, VM *vm)
 Get current free memory.
static Value sys_wait_for_input (const std::vector< Value > &args, VM *vm)
 Wait for input.
static Value sys_shell (const std::vector< Value > &args, VM *vm)
 Run a shell command.
static i64 sys_fork (const std::vector< Value > &args, VM *vm)
 Run a native program.
static i64 sys_fork_detached (const std::vector< Value > &args, VM *vm)
 Run a native program detached.
static Value sys_crash (const std::vector< Value > &args, VM *vm)
 Crash the VM / Program.
static Value sys_reset (const std::vector< Value > &args, VM *vm)
 Reset the VM.
static i64 sys_pid (const std::vector< Value > &args, VM *vm)
 Get the current process ID.
static PhsString sys_os (const std::vector< Value > &args, VM *vm)
 Get the current OS.
static Value sys_isatty (const std::vector< Value > &args, VM *vm)
 Check if the current output is a terminal.
static Value sys_env (const std::vector< Value > &args, VM *vm)
 Get the current environment variables.
static Value sys_argv (const std::vector< Value > &args, VM *vm)
 Get the current command line arguments.
static i64 sys_argc (const std::vector< Value > &args, VM *vm)
 Get the current number of command line arguments.
static f64 sys_time (const std::vector< Value > &args, VM *vm)
 Current time.
static Value sys_time_formatted (const std::vector< Value > &args, VM *vm)
 Current time formatted.
static Value sys_sleep (const std::vector< Value > &args, VM *vm)
 Sleep for a specified amount of time.
static Value sys_shutdown (const std::vector< Value > &args, VM *vm)
 Shutdown the VM.
static i64 to_int (const std::vector< Value > &args, VM *vm)
 Convert to integer.
static f64 to_float (const std::vector< Value > &args, VM *vm)
 Convert to float.
static PhsString to_string (const std::vector< Value > &args, VM *vm)
 Convert to string.
static bool to_bool (const std::vector< Value > &args, VM *vm)
 Convert to boolean.
static Value rand_seed (const std::vector< Value > &args, VM *vm)
 Seed the random number generator.
static i64 rand_next_range (const std::vector< Value > &args, VM *vm)
 Get a random number in range.
static f64 rand_next_float (const std::vector< Value > &args, VM *vm)
 Get a random float (technically a f64 at a low level).
static i64 str_find (const std::vector< Value > &args, VM *vm)
 Find string in string.
static i64 str_len (const std::vector< Value > &args, VM *vm)
 Get string length.
static Value str_char_at (const std::vector< Value > &args, VM *vm)
 Get character at index.
static Value str_substr (const std::vector< Value > &args, VM *vm)
 Get substring.
static PhsString str_concat (const std::vector< Value > &args, VM *vm)
 Concatenate strings.
static PhsString str_upper (const std::vector< Value > &args, VM *vm)
 Convert to uppercase.
static PhsString str_lower (const std::vector< Value > &args, VM *vm)
 Convert to lowercase.
static Value str_starts_with (const std::vector< Value > &args, VM *vm)
 Check if string starts with.
static Value str_ends_with (const std::vector< Value > &args, VM *vm)
 Check if string ends with.
static i64 sb_new (const std::vector< Value > &args, VM *vm)
 Create new string builder.
static Value sb_append (const std::vector< Value > &args, VM *vm)
 Append to string builder.
static PhsString sb_to_string (const std::vector< Value > &args, VM *vm)
 Convert string builder to string.
static Value sb_clear (const std::vector< Value > &args, VM *vm)
 Clear string builder.
static PhsString sb_free (const std::vector< Value > &args, VM *vm)
 Free string builder.
static PhsString io_c_format (const std::vector< Value > &args, VM *vm)
 Format string.
static Value io_clear (const std::vector< Value > &args, VM *vm)
 Clear the console.
static PhsString io_prints (const std::vector< Value > &args, VM *vm)
 Print string without newline.
static PhsString io_printf (const std::vector< Value > &args, VM *vm)
 Print formatted string.
static PhsString io_puts (const std::vector< Value > &args, VM *vm)
 Print string with newline.
static PhsString io_putf (const std::vector< Value > &args, VM *vm)
 Print formatted string with newline.
static Value io_gets (const std::vector< Value > &args, VM *vm)
 Get string.
static PhsString io_putf_error (const std::vector< Value > &args, VM *vm)
 Print formatted string with newline to error output.
static PhsString io_puts_error (const std::vector< Value > &args, VM *vm)
 Print string with newline to error output.

Detailed Description

Phasor Standard library.

Contains all the base standard library functions used for any language targetting the Phasor Runtime

Definition at line 33 of file StdLib.hpp.

Member Enumeration Documentation

◆ dupenv_ret [1/2]

enum class Phasor::StdLib::dupenv_ret
strongprivate
Enumerator
Success 
InvalidInput 
NotFound 
Success 
InvalidInput 
NotFound 

Definition at line 79 of file PhasorStdLib.hpp.

◆ dupenv_ret [2/2]

enum class Phasor::StdLib::dupenv_ret
strongprivate
Enumerator
Success 
InvalidInput 
NotFound 
Success 
InvalidInput 
NotFound 

Definition at line 60 of file StdLib.hpp.

Member Function Documentation

◆ array_insert()

Value Phasor::StdLib::array_insert ( const std::vector< Value > & args,
VM * vm )
staticprivate

Insert into array.

Definition at line 70 of file array.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ array_length()

i64 Phasor::StdLib::array_length ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get array length.

Definition at line 33 of file array.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ array_pop()

Value Phasor::StdLib::array_pop ( const std::vector< Value > & args,
VM * vm )
staticprivate

Pop from array.

Definition at line 55 of file array.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ array_push()

Value Phasor::StdLib::array_push ( const std::vector< Value > & args,
VM * vm )
staticprivate

Push to array.

Definition at line 43 of file array.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ array_resize()

Value Phasor::StdLib::array_resize ( const std::vector< Value > & args,
VM * vm )
staticprivate

Resize array.

Definition at line 17 of file array.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkArgCount() [1/2]

void Phasor::StdLib::checkArgCount ( const std::vector< Value > & args,
size_t minimumArguments,
const std::string & name,
bool allowMoreArguments = false )
static

◆ checkArgCount() [2/2]

void Phasor::StdLib::checkArgCount ( const std::vector< Value > & args,
size_t minimumArguments,
const std::string & name,
bool allowMoreArguments = false )
static

Definition at line 44 of file StdLib.cpp.

Here is the caller graph for this function:

◆ dupenv() [1/2]

dupenv_ret Phasor::StdLib::dupenv ( PhsString & out,
const char * name )
staticprivate

◆ dupenv() [2/2]

StdLib::dupenv_ret Phasor::StdLib::dupenv ( PhsString & out,
const char * name )
staticprivate

Definition at line 15 of file StdLib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_absolute() [1/2]

PhsString Phasor::StdLib::file_absolute ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get full path to relative path.

◆ file_absolute() [2/2]

PhsString Phasor::StdLib::file_absolute ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get full path to relative path.

Definition at line 40 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_append() [1/2]

bool Phasor::StdLib::file_append ( const std::vector< Value > & args,
VM * vm )
staticprivate

Append to file.

◆ file_append() [2/2]

bool Phasor::StdLib::file_append ( const std::vector< Value > & args,
VM * vm )
staticprivate

Append to file.

Definition at line 195 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_copy() [1/2]

bool Phasor::StdLib::file_copy ( const std::vector< Value > & args,
VM * vm )
staticprivate

Copy file.

◆ file_copy() [2/2]

bool Phasor::StdLib::file_copy ( const std::vector< Value > & args,
VM * vm )
staticprivate

Copy file.

Definition at line 252 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_create() [1/2]

bool Phasor::StdLib::file_create ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_create() [2/2]

bool Phasor::StdLib::file_create ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 343 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_create_directory() [1/2]

bool Phasor::StdLib::file_create_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_create_directory() [2/2]

bool Phasor::StdLib::file_create_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 370 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_current_directory() [1/2]

Value Phasor::StdLib::file_current_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get/set working directory.

◆ file_current_directory() [2/2]

Value Phasor::StdLib::file_current_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get/set working directory.

Definition at line 234 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_delete() [1/2]

bool Phasor::StdLib::file_delete ( const std::vector< Value > & args,
VM * vm )
staticprivate

Delete file.

◆ file_delete() [2/2]

bool Phasor::StdLib::file_delete ( const std::vector< Value > & args,
VM * vm )
staticprivate

Delete file.

Definition at line 209 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_exists() [1/2]

bool Phasor::StdLib::file_exists ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if file exists.

◆ file_exists() [2/2]

bool Phasor::StdLib::file_exists ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if file exists.

Definition at line 189 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_extension() [1/2]

PhsString Phasor::StdLib::file_extension ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the extension of a path.

◆ file_extension() [2/2]

PhsString Phasor::StdLib::file_extension ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the extension of a path.

Definition at line 58 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_filename() [1/2]

PhsString Phasor::StdLib::file_filename ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the filename.

◆ file_filename() [2/2]

PhsString Phasor::StdLib::file_filename ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the filename.

Definition at line 52 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_get_size() [1/2]

i64 Phasor::StdLib::file_get_size ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_get_size() [2/2]

i64 Phasor::StdLib::file_get_size ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 84 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_is_directory() [1/2]

bool Phasor::StdLib::file_is_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if path is directory.

◆ file_is_directory() [2/2]

bool Phasor::StdLib::file_is_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if path is directory.

Definition at line 70 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_join_path() [1/2]

PhsString Phasor::StdLib::file_join_path ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_join_path() [2/2]

PhsString Phasor::StdLib::file_join_path ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 76 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_move() [1/2]

bool Phasor::StdLib::file_move ( const std::vector< Value > & args,
VM * vm )
staticprivate

Move file.

◆ file_move() [2/2]

bool Phasor::StdLib::file_move ( const std::vector< Value > & args,
VM * vm )
staticprivate

Move file.

Definition at line 305 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_parent() [1/2]

PhsString Phasor::StdLib::file_parent ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the parent of a path.

◆ file_parent() [2/2]

PhsString Phasor::StdLib::file_parent ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the parent of a path.

Definition at line 64 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_property_edit() [1/2]

bool Phasor::StdLib::file_property_edit ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_property_edit() [2/2]

bool Phasor::StdLib::file_property_edit ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 322 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_property_get() [1/2]

i64 Phasor::StdLib::file_property_get ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_property_get() [2/2]

i64 Phasor::StdLib::file_property_get ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 335 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_read() [1/2]

Value Phasor::StdLib::file_read ( const std::vector< Value > & args,
VM * vm )
staticprivate

Read file.

◆ file_read() [2/2]

Value Phasor::StdLib::file_read ( const std::vector< Value > & args,
VM * vm )
staticprivate

Read file.

Definition at line 90 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_read_directory() [1/2]

Value Phasor::StdLib::file_read_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_read_directory() [2/2]

Value Phasor::StdLib::file_read_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 357 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_read_line() [1/2]

PhsString Phasor::StdLib::file_read_line ( const std::vector< Value > & args,
VM * vm )
staticprivate

Read a line from file.

◆ file_read_line() [2/2]

PhsString Phasor::StdLib::file_read_line ( const std::vector< Value > & args,
VM * vm )
staticprivate

Read a line from file.

Definition at line 104 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_remove_directory() [1/2]

bool Phasor::StdLib::file_remove_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ file_remove_directory() [2/2]

bool Phasor::StdLib::file_remove_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 380 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_rename() [1/2]

bool Phasor::StdLib::file_rename ( const std::vector< Value > & args,
VM * vm )
staticprivate

Rename file.

◆ file_rename() [2/2]

bool Phasor::StdLib::file_rename ( const std::vector< Value > & args,
VM * vm )
staticprivate

Rename file.

Definition at line 220 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_stem() [1/2]

PhsString Phasor::StdLib::file_stem ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the stem of a path.

◆ file_stem() [2/2]

PhsString Phasor::StdLib::file_stem ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the stem of a path.

Definition at line 46 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_write() [1/2]

bool Phasor::StdLib::file_write ( const std::vector< Value > & args,
VM * vm )
staticprivate

Write to file.

◆ file_write() [2/2]

bool Phasor::StdLib::file_write ( const std::vector< Value > & args,
VM * vm )
staticprivate

Write to file.

Definition at line 175 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_write_line() [1/2]

bool Phasor::StdLib::file_write_line ( const std::vector< Value > & args,
VM * vm )
staticprivate

Write a line to file.

◆ file_write_line() [2/2]

bool Phasor::StdLib::file_write_line ( const std::vector< Value > & args,
VM * vm )
staticprivate

Write a line to file.

Definition at line 123 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_c_format() [1/2]

PhsString Phasor::StdLib::io_c_format ( const std::vector< Value > & args,
VM * vm )
staticprivate

Format string.

◆ io_c_format() [2/2]

PhsString Phasor::StdLib::io_c_format ( const std::vector< Value > & args,
VM * vm )
staticprivate

Format string.

Definition at line 31 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_clear() [1/2]

Value Phasor::StdLib::io_clear ( const std::vector< Value > & args,
VM * vm )
staticprivate

Clear the console.

◆ io_clear() [2/2]

Value Phasor::StdLib::io_clear ( const std::vector< Value > & args,
VM * vm )
staticprivate

Clear the console.

Definition at line 23 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_gets() [1/2]

Value Phasor::StdLib::io_gets ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get string.

◆ io_gets() [2/2]

Value Phasor::StdLib::io_gets ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get string.

Definition at line 80 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_printf() [1/2]

PhsString Phasor::StdLib::io_printf ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string.

◆ io_printf() [2/2]

PhsString Phasor::StdLib::io_printf ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string.

Definition at line 54 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_prints() [1/2]

PhsString Phasor::StdLib::io_prints ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string without newline.

◆ io_prints() [2/2]

PhsString Phasor::StdLib::io_prints ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string without newline.

Definition at line 47 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_putf() [1/2]

PhsString Phasor::StdLib::io_putf ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string with newline.

◆ io_putf() [2/2]

PhsString Phasor::StdLib::io_putf ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string with newline.

Definition at line 70 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_putf_error() [1/2]

PhsString Phasor::StdLib::io_putf_error ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string with newline to error output.

◆ io_putf_error() [2/2]

PhsString Phasor::StdLib::io_putf_error ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string with newline to error output.

Definition at line 95 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_puts() [1/2]

PhsString Phasor::StdLib::io_puts ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string with newline.

◆ io_puts() [2/2]

PhsString Phasor::StdLib::io_puts ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string with newline.

Definition at line 62 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_puts_error() [1/2]

PhsString Phasor::StdLib::io_puts_error ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string with newline to error output.

◆ io_puts_error() [2/2]

PhsString Phasor::StdLib::io_puts_error ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string with newline to error output.

Definition at line 87 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_abs() [1/2]

Value Phasor::StdLib::math_abs ( const std::vector< Value > & args,
VM * vm )
staticprivate

Absolute value.

◆ math_abs() [2/2]

Value Phasor::StdLib::math_abs ( const std::vector< Value > & args,
VM * vm )
staticprivate

Absolute value.

Todo
Implement abs natively

Definition at line 38 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_ceil() [1/2]

f64 Phasor::StdLib::math_ceil ( const std::vector< Value > & args,
VM * vm )
staticprivate

Ceiling.

◆ math_ceil() [2/2]

f64 Phasor::StdLib::math_ceil ( const std::vector< Value > & args,
VM * vm )
staticprivate

Ceiling.

Todo
Implement ceil natively

Definition at line 54 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_cos() [1/2]

f64 Phasor::StdLib::math_cos ( const std::vector< Value > & args,
VM * vm )
staticprivate

Cosine.

◆ math_cos() [2/2]

f64 Phasor::StdLib::math_cos ( const std::vector< Value > & args,
VM * vm )
staticprivate

Cosine.

Definition at line 126 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_exp() [1/2]

f64 Phasor::StdLib::math_exp ( const std::vector< Value > & args,
VM * vm )
staticprivate

Exponential.

◆ math_exp() [2/2]

f64 Phasor::StdLib::math_exp ( const std::vector< Value > & args,
VM * vm )
staticprivate

Exponential.

Definition at line 114 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_floor() [1/2]

f64 Phasor::StdLib::math_floor ( const std::vector< Value > & args,
VM * vm )
staticprivate

Floor.

◆ math_floor() [2/2]

f64 Phasor::StdLib::math_floor ( const std::vector< Value > & args,
VM * vm )
staticprivate

Floor.

Todo
Implement floor natively

Definition at line 47 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_log() [1/2]

f64 Phasor::StdLib::math_log ( const std::vector< Value > & args,
VM * vm )
staticprivate

Natural logarithm.

◆ math_log() [2/2]

f64 Phasor::StdLib::math_log ( const std::vector< Value > & args,
VM * vm )
staticprivate

Natural logarithm.

Definition at line 108 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_max() [1/2]

Value Phasor::StdLib::math_max ( const std::vector< Value > & args,
VM * vm )
staticprivate

Maximum.

◆ math_max() [2/2]

Value Phasor::StdLib::math_max ( const std::vector< Value > & args,
VM * vm )
staticprivate

Maximum.

Definition at line 88 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_min() [1/2]

Value Phasor::StdLib::math_min ( const std::vector< Value > & args,
VM * vm )
staticprivate

Minimum.

◆ math_min() [2/2]

Value Phasor::StdLib::math_min ( const std::vector< Value > & args,
VM * vm )
staticprivate

Minimum.

Definition at line 68 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_pow() [1/2]

f64 Phasor::StdLib::math_pow ( const std::vector< Value > & args,
VM * vm )
staticprivate

Power.

◆ math_pow() [2/2]

f64 Phasor::StdLib::math_pow ( const std::vector< Value > & args,
VM * vm )
staticprivate

Power.

Definition at line 30 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_round() [1/2]

f64 Phasor::StdLib::math_round ( const std::vector< Value > & args,
VM * vm )
staticprivate

Round.

◆ math_round() [2/2]

f64 Phasor::StdLib::math_round ( const std::vector< Value > & args,
VM * vm )
staticprivate

Round.

Todo
Implement round natively

Definition at line 61 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_sin() [1/2]

f64 Phasor::StdLib::math_sin ( const std::vector< Value > & args,
VM * vm )
staticprivate

Sine.

◆ math_sin() [2/2]

f64 Phasor::StdLib::math_sin ( const std::vector< Value > & args,
VM * vm )
staticprivate

Sine.

Definition at line 120 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_sqrt() [1/2]

f64 Phasor::StdLib::math_sqrt ( const std::vector< Value > & args,
VM * vm )
staticprivate

Square root.

◆ math_sqrt() [2/2]

f64 Phasor::StdLib::math_sqrt ( const std::vector< Value > & args,
VM * vm )
staticprivate

Square root.

Definition at line 24 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_tan() [1/2]

f64 Phasor::StdLib::math_tan ( const std::vector< Value > & args,
VM * vm )
staticprivate

Tangent.

◆ math_tan() [2/2]

f64 Phasor::StdLib::math_tan ( const std::vector< Value > & args,
VM * vm )
staticprivate

Tangent.

Definition at line 132 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_get_version() [1/2]

PhsString Phasor::StdLib::meta_get_version ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ meta_get_version() [2/2]

PhsString Phasor::StdLib::meta_get_version ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 49 of file meta.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_operation() [1/2]

i64 Phasor::StdLib::meta_operation ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ meta_operation() [2/2]

i64 Phasor::StdLib::meta_operation ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 18 of file meta.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_stack_run() [1/2]

Value Phasor::StdLib::meta_stack_run ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ meta_stack_run() [2/2]

Value Phasor::StdLib::meta_stack_run ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 34 of file meta.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rand_next_float() [1/2]

f64 Phasor::StdLib::rand_next_float ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get a random float (technically a f64 at a low level).

◆ rand_next_float() [2/2]

f64 Phasor::StdLib::rand_next_float ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get a random float (technically a f64 at a low level).

Definition at line 43 of file random.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rand_next_range() [1/2]

i64 Phasor::StdLib::rand_next_range ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get a random number in range.

◆ rand_next_range() [2/2]

i64 Phasor::StdLib::rand_next_range ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get a random number in range.

Definition at line 29 of file random.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rand_seed() [1/2]

Value Phasor::StdLib::rand_seed ( const std::vector< Value > & args,
VM * vm )
staticprivate

Seed the random number generator.

◆ rand_seed() [2/2]

Value Phasor::StdLib::rand_seed ( const std::vector< Value > & args,
VM * vm )
staticprivate

Seed the random number generator.

Definition at line 14 of file random.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerArrayFunctions()

void Phasor::StdLib::registerArrayFunctions ( VM * vm)
staticprivate

Definition at line 8 of file array.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerFileFunctions() [1/2]

void Phasor::StdLib::registerFileFunctions ( VM * vm)
staticprivate

◆ registerFileFunctions() [2/2]

void Phasor::StdLib::registerFileFunctions ( VM * vm)
staticprivate

Definition at line 11 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerFunctions() [1/2]

void Phasor::StdLib::registerFunctions ( VM & vm)
inlinestatic

Definition at line 55 of file PhasorStdLib.hpp.

Here is the call graph for this function:

◆ registerFunctions() [2/2]

void Phasor::StdLib::registerFunctions ( VM & vm)
inlinestatic

Definition at line 36 of file StdLib.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerIOFunctions() [1/2]

void Phasor::StdLib::registerIOFunctions ( VM * vm)
staticprivate

◆ registerIOFunctions() [2/2]

void Phasor::StdLib::registerIOFunctions ( VM * vm)
staticprivate

Definition at line 7 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerMathFunctions() [1/2]

void Phasor::StdLib::registerMathFunctions ( VM * vm)
staticprivate

◆ registerMathFunctions() [2/2]

void Phasor::StdLib::registerMathFunctions ( VM * vm)
staticprivate

Definition at line 7 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerMemoryFunctions() [1/2]

void Phasor::StdLib::registerMemoryFunctions ( VM * vm)
staticprivate

◆ registerMemoryFunctions() [2/2]

void Phasor::StdLib::registerMemoryFunctions ( VM * vm)
staticprivate

Definition at line 6 of file memory.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerMetaFunctions() [1/2]

void Phasor::StdLib::registerMetaFunctions ( VM * vm)
staticprivate

◆ registerMetaFunctions() [2/2]

void Phasor::StdLib::registerMetaFunctions ( VM * vm)
staticprivate

Definition at line 8 of file meta.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerRandomFunctions() [1/2]

void Phasor::StdLib::registerRandomFunctions ( VM * vm)
staticprivate

◆ registerRandomFunctions() [2/2]

void Phasor::StdLib::registerRandomFunctions ( VM * vm)
staticprivate

Definition at line 7 of file random.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerStringFunctions() [1/2]

void Phasor::StdLib::registerStringFunctions ( VM * vm)
staticprivate

◆ registerStringFunctions() [2/2]

void Phasor::StdLib::registerStringFunctions ( VM * vm)
staticprivate

Definition at line 8 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerSysFunctions() [1/2]

void Phasor::StdLib::registerSysFunctions ( VM * vm)
staticprivate

◆ registerSysFunctions() [2/2]

void Phasor::StdLib::registerSysFunctions ( VM * vm)
staticprivate

Definition at line 34 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerTypeConvFunctions() [1/2]

void Phasor::StdLib::registerTypeConvFunctions ( VM * vm)
staticprivate

◆ registerTypeConvFunctions() [2/2]

void Phasor::StdLib::registerTypeConvFunctions ( VM * vm)
staticprivate

Definition at line 7 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_append() [1/2]

Value Phasor::StdLib::sb_append ( const std::vector< Value > & args,
VM * vm )
staticprivate

Append to string builder.

◆ sb_append() [2/2]

Value Phasor::StdLib::sb_append ( const std::vector< Value > & args,
VM * vm )
staticprivate

Append to string builder.

Definition at line 91 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_clear() [1/2]

Value Phasor::StdLib::sb_clear ( const std::vector< Value > & args,
VM * vm )
staticprivate

Clear string builder.

◆ sb_clear() [2/2]

Value Phasor::StdLib::sb_clear ( const std::vector< Value > & args,
VM * vm )
staticprivate

Clear string builder.

Definition at line 121 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_free() [1/2]

PhsString Phasor::StdLib::sb_free ( const std::vector< Value > & args,
VM * vm )
staticprivate

Free string builder.

◆ sb_free() [2/2]

PhsString Phasor::StdLib::sb_free ( const std::vector< Value > & args,
VM * vm )
staticprivate

Free string builder.

Definition at line 112 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_new() [1/2]

i64 Phasor::StdLib::sb_new ( const std::vector< Value > & args,
VM * vm )
staticprivate

Create new string builder.

◆ sb_new() [2/2]

i64 Phasor::StdLib::sb_new ( const std::vector< Value > & args,
VM * vm )
staticprivate

Create new string builder.

Definition at line 73 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_to_string() [1/2]

PhsString Phasor::StdLib::sb_to_string ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert string builder to string.

◆ sb_to_string() [2/2]

PhsString Phasor::StdLib::sb_to_string ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert string builder to string.

Definition at line 102 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ std_assert() [1/2]

Value Phasor::StdLib::std_assert ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ std_assert() [2/2]

Value Phasor::StdLib::std_assert ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 109 of file StdLib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ std_import() [1/2]

bool Phasor::StdLib::std_import ( const std::vector< Value > & args,
VM * vm )
staticprivate

◆ std_import() [2/2]

bool Phasor::StdLib::std_import ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 59 of file StdLib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_char_at() [1/2]

Value Phasor::StdLib::str_char_at ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get character at index.

◆ str_char_at() [2/2]

Value Phasor::StdLib::str_char_at ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get character at index.

Definition at line 131 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_concat() [1/2]

PhsString Phasor::StdLib::str_concat ( const std::vector< Value > & args,
VM * vm )
staticprivate

Concatenate strings.

◆ str_concat() [2/2]

PhsString Phasor::StdLib::str_concat ( const std::vector< Value > & args,
VM * vm )
staticprivate

Concatenate strings.

Definition at line 164 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_ends_with() [1/2]

Value Phasor::StdLib::str_ends_with ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if string ends with.

◆ str_ends_with() [2/2]

Value Phasor::StdLib::str_ends_with ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if string ends with.

Definition at line 210 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_find() [1/2]

i64 Phasor::StdLib::str_find ( const std::vector< Value > & args,
VM * vm )
staticprivate

Find string in string.

◆ str_find() [2/2]

i64 Phasor::StdLib::str_find ( const std::vector< Value > & args,
VM * vm )
staticprivate

Find string in string.

Definition at line 39 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_len() [1/2]

i64 Phasor::StdLib::str_len ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get string length.

◆ str_len() [2/2]

i64 Phasor::StdLib::str_len ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get string length.

Definition at line 175 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_lower() [1/2]

PhsString Phasor::StdLib::str_lower ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to lowercase.

◆ str_lower() [2/2]

PhsString Phasor::StdLib::str_lower ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to lowercase.

Definition at line 190 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_starts_with() [1/2]

Value Phasor::StdLib::str_starts_with ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if string starts with.

◆ str_starts_with() [2/2]

Value Phasor::StdLib::str_starts_with ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if string starts with.

Definition at line 198 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_substr() [1/2]

Value Phasor::StdLib::str_substr ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get substring.

◆ str_substr() [2/2]

Value Phasor::StdLib::str_substr ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get substring.

Definition at line 145 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_upper() [1/2]

PhsString Phasor::StdLib::str_upper ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to uppercase.

◆ str_upper() [2/2]

PhsString Phasor::StdLib::str_upper ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to uppercase.

Definition at line 182 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_argc() [1/2]

i64 Phasor::StdLib::sys_argc ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current number of command line arguments.

◆ sys_argc() [2/2]

i64 Phasor::StdLib::sys_argc ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current number of command line arguments – deprecated, use len(sys_args()) instead.

Definition at line 142 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_args()

Value Phasor::StdLib::sys_args ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get args array.

Definition at line 156 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_argv() [1/2]

Value Phasor::StdLib::sys_argv ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current command line arguments.

◆ sys_argv() [2/2]

Value Phasor::StdLib::sys_argv ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current command line arguments – deprecated, use sys_args() instead.

Definition at line 148 of file system.cpp.

Here is the call graph for this function:

◆ sys_crash() [1/2]

Value Phasor::StdLib::sys_crash ( const std::vector< Value > & args,
VM * vm )
staticprivate

Crash the VM / Program.

◆ sys_crash() [2/2]

Value Phasor::StdLib::sys_crash ( const std::vector< Value > & args,
VM * vm )
staticprivate

Crash the VM / Program.

Definition at line 240 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_env() [1/2]

Value Phasor::StdLib::sys_env ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current environment variables.

◆ sys_env() [2/2]

Value Phasor::StdLib::sys_env ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current environment variables.

Definition at line 131 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_fork() [1/2]

i64 Phasor::StdLib::sys_fork ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a native program.

◆ sys_fork() [2/2]

i64 Phasor::StdLib::sys_fork ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a native program.

Definition at line 214 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_fork_detached() [1/2]

i64 Phasor::StdLib::sys_fork_detached ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a native program detached.

◆ sys_fork_detached() [2/2]

i64 Phasor::StdLib::sys_fork_detached ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a native program detached.

Definition at line 227 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_get_free_memory() [1/2]

i64 Phasor::StdLib::sys_get_free_memory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get current free memory.

◆ sys_get_free_memory() [2/2]

i64 Phasor::StdLib::sys_get_free_memory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get current free memory.

Definition at line 195 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_isatty() [1/2]

Value Phasor::StdLib::sys_isatty ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if the current output is a terminal.

◆ sys_isatty() [2/2]

Value Phasor::StdLib::sys_isatty ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if the current output is a terminal.

Definition at line 265 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_os() [1/2]

PhsString Phasor::StdLib::sys_os ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current OS.

◆ sys_os() [2/2]

PhsString Phasor::StdLib::sys_os ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current OS.

Definition at line 177 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_pid() [1/2]

i64 Phasor::StdLib::sys_pid ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current process ID.

◆ sys_pid() [2/2]

i64 Phasor::StdLib::sys_pid ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current process ID.

Definition at line 255 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_reset() [1/2]

Value Phasor::StdLib::sys_reset ( const std::vector< Value > & args,
VM * vm )
staticprivate

Reset the VM.

◆ sys_reset() [2/2]

Value Phasor::StdLib::sys_reset ( const std::vector< Value > & args,
VM * vm )
staticprivate

Reset the VM.

Definition at line 248 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_shell() [1/2]

Value Phasor::StdLib::sys_shell ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a shell command.

◆ sys_shell() [2/2]

Value Phasor::StdLib::sys_shell ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a shell command.

Definition at line 208 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_shutdown() [1/2]

Value Phasor::StdLib::sys_shutdown ( const std::vector< Value > & args,
VM * vm )
staticprivate

Shutdown the VM.

◆ sys_shutdown() [2/2]

Value Phasor::StdLib::sys_shutdown ( const std::vector< Value > & args,
VM * vm )
staticprivate

Shutdown the VM.

Definition at line 167 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_sleep() [1/2]

Value Phasor::StdLib::sys_sleep ( const std::vector< Value > & args,
VM * vm )
staticprivate

Sleep for a specified amount of time.

◆ sys_sleep() [2/2]

Value Phasor::StdLib::sys_sleep ( const std::vector< Value > & args,
VM * vm )
staticprivate

Sleep for a specified amount of time.

Definition at line 123 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_time() [1/2]

f64 Phasor::StdLib::sys_time ( const std::vector< Value > & args,
VM * vm )
staticprivate

Current time.

◆ sys_time() [2/2]

f64 Phasor::StdLib::sys_time ( const std::vector< Value > & args,
VM * vm )
staticprivate

Current time.

Definition at line 90 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_time_formatted() [1/2]

Value Phasor::StdLib::sys_time_formatted ( const std::vector< Value > & args,
VM * vm )
staticprivate

Current time formatted.

◆ sys_time_formatted() [2/2]

Value Phasor::StdLib::sys_time_formatted ( const std::vector< Value > & args,
VM * vm )
staticprivate

Current time formatted.

Definition at line 99 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_wait_for_input() [1/2]

Value Phasor::StdLib::sys_wait_for_input ( const std::vector< Value > & args,
VM * vm )
staticprivate

Wait for input.

◆ sys_wait_for_input() [2/2]

Value Phasor::StdLib::sys_wait_for_input ( const std::vector< Value > & args,
VM * vm )
staticprivate

Wait for input.

Definition at line 201 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_bool() [1/2]

bool Phasor::StdLib::to_bool ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to boolean.

◆ to_bool() [2/2]

bool Phasor::StdLib::to_bool ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to boolean.

Definition at line 50 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_float() [1/2]

f64 Phasor::StdLib::to_float ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to float.

◆ to_float() [2/2]

f64 Phasor::StdLib::to_float ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to float.

Definition at line 38 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_int() [1/2]

i64 Phasor::StdLib::to_int ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to integer.

◆ to_int() [2/2]

i64 Phasor::StdLib::to_int ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to integer.

Definition at line 15 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_string() [1/2]

PhsString Phasor::StdLib::to_string ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to string.

◆ to_string() [2/2]

PhsString Phasor::StdLib::to_string ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to string.

Definition at line 44 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ var_free() [1/2]

Value Phasor::StdLib::var_free ( const std::vector< Value > & args,
VM * vm )
staticprivate

Free a variable.

◆ var_free() [2/2]

Value Phasor::StdLib::var_free ( const std::vector< Value > & args,
VM * vm )
staticprivate

Free a variable.

Definition at line 11 of file memory.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ argc

int Phasor::StdLib::argc = 0
static

Number of command line arguments.

Definition at line 49 of file StdLib.hpp.

◆ argv

char ** Phasor::StdLib::argv = nullptr
static

Command line arguments.

Definition at line 48 of file StdLib.hpp.


The documentation for this class was generated from the following files: