PRISM_EXPORTED_FUNCTION void pm_options_encoding_set(pm_options_t *options, const char *encoding)
Set the encoding option on the given options struct.
PRISM_EXPORTED_FUNCTION void pm_options_free(pm_options_t *options)
Free the internal memory associated with the options.
struct pm_options_scope pm_options_scope_t
A scope of locals surrounding the code that is being parsed.
PRISM_EXPORTED_FUNCTION const pm_string_t * pm_options_scope_local_get(const pm_options_scope_t *scope, size_t index)
Return a pointer to the local at the given index within the given scope.
void pm_options_read(pm_options_t *options, const char *data)
Deserialize an options struct from the given binary string.
PRISM_EXPORTED_FUNCTION void pm_options_scopes_init(pm_options_t *options, size_t scopes_count)
Allocate and zero out the scopes array on the given options struct.
PRISM_EXPORTED_FUNCTION void pm_options_suppress_warnings_set(pm_options_t *options, bool suppress_warnings)
Set the suppress warnings option on the given options struct.
PRISM_EXPORTED_FUNCTION void pm_options_line_set(pm_options_t *options, int32_t line)
Set the line option on the given options struct.
PRISM_EXPORTED_FUNCTION const pm_options_scope_t * pm_options_scope_get(const pm_options_t *options, size_t index)
Return a pointer to the scope at the given index within the given options.
PRISM_EXPORTED_FUNCTION void pm_options_frozen_string_literal_set(pm_options_t *options, bool frozen_string_literal)
Set the frozen string literal option on the given options struct.
PRISM_EXPORTED_FUNCTION void pm_options_filepath_set(pm_options_t *options, const char *filepath)
Set the filepath option on the given options struct.
PRISM_EXPORTED_FUNCTION void pm_options_scope_init(pm_options_scope_t *scope, size_t locals_count)
Create a new options scope struct.
A generic string type that can have various ownership semantics.
Macro definitions used throughout the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
A scope of locals surrounding the code that is being parsed.
size_t locals_count
The number of locals in the scope.
pm_string_t * locals
The names of the locals in the scope.
The options that can be passed to the parser.
pm_options_scope_t * scopes
The scopes surrounding the code that is being parsed.
size_t scopes_count
The number of scopes surrounding the code that is being parsed.
bool suppress_warnings
Whether or not we should suppress warnings.
pm_string_t encoding
The name of the encoding that the source file is in.
bool frozen_string_literal
Whether or not the frozen string literal option has been set.
int32_t line
The line within the file that the parse starts on.
pm_string_t filepath
The name of the file that is currently being parsed.
A generic string type that can have various ownership semantics.