|
Ruby 4.1.0dev (2026-10-27 revision ee55edef0d1f32704d7dfd37c935f9d2c8a55bb1)
|
Functions for querying properties of strings, such as whether they are valid local variable names, constant names, or method names. More...
#include "prism/compiler/exported.h"#include "prism/compiler/nonnull.h"#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Enumerations | |
| enum | pm_string_query_t { PM_STRING_QUERY_ERROR = -1 , PM_STRING_QUERY_FALSE , PM_STRING_QUERY_TRUE } |
| Represents the results of a slice query. More... | |
Functions for querying properties of strings, such as whether they are valid local variable names, constant names, or method names.
Definition in file string_query.h.
| enum pm_string_query_t |
Represents the results of a slice query.
Definition at line 23 of file string_query.h.
| PRISM_EXPORTED_FUNCTION pm_string_query_t PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_constant | ( | const uint8_t * | source, |
| size_t | length, | ||
| const char * | encoding_name | ||
| ) |
Check that the slice is a valid constant name.
| source | The source to check. |
| length | The length of the source. |
| encoding_name | The name of the encoding of the source. |
| PRISM_EXPORTED_FUNCTION pm_string_query_t PRISM_EXPORTED_FUNCTION pm_string_query_t PRISM_EXPORTED_FUNCTION pm_string_query_t PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_keyword | ( | const uint8_t * | source, |
| size_t | length, | ||
| const char * | encoding_name | ||
| ) |
Check that the slice is a keyword.
| source | The source to check. |
| length | The length of the source. |
| encoding_name | The name of the encoding of the source. |
| PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_local | ( | const uint8_t * | source, |
| size_t | length, | ||
| const char * | encoding_name | ||
| ) |
Check that the slice is a valid local variable name.
| source | The source to check. |
| length | The length of the source. |
| encoding_name | The name of the encoding of the source. |
| PRISM_EXPORTED_FUNCTION pm_string_query_t PRISM_EXPORTED_FUNCTION pm_string_query_t PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_method_name | ( | const uint8_t * | source, |
| size_t | length, | ||
| const char * | encoding_name | ||
| ) |
Check that the slice is a valid method name.
| source | The source to check. |
| length | The length of the source. |
| encoding_name | The name of the encoding of the source. |