|
Ruby 4.1.0dev (2026-04-04 revision 3b6245536cf55da9e8bfcdb03c845fe9ef931d7f)
|
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 | |
| PRISM_EXPORTED_FUNCTION pm_string_query_t | pm_string_query_local (const uint8_t *source, size_t length, const char *encoding_name) PRISM_NONNULL(1 |
| Check that the slice is a valid local variable name. | |
| 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) PRISM_NONNULL(1 |
| Check that the slice is a valid constant name. | |
| 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) PRISM_NONNULL(1 |
| Check that the slice is a valid method name. | |
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 19 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 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. |