|
Ruby 4.1.0dev (2026-12-06 revision 2c909473e0801d734f63591bb567e8d554c8a771)
|
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_VERSION = -2 , 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, size_t encoding_length, const char *version, size_t version_length) 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, size_t encoding_length, const char *version, size_t version_length) 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, size_t encoding_length, const char *version, size_t version_length) PRISM_NONNULL(1 |
| Check that the slice is a valid method name. | |
| 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, size_t encoding_length, const char *version, size_t version_length) PRISM_NONNULL(1 |
| Check that the slice is a keyword. | |
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, | ||
| size_t | encoding_length, | ||
| const char * | version, | ||
| size_t | version_length ) |
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. |
| encoding_length | The length of the encoding name in bytes. |
| version | The version of Ruby to answer for, as pm_options_version_set reads it, such as "3.4" or "latest". NULL is the latest version. |
| version_length | The length of the version in bytes, or 0 for NULL. |
| 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, | ||
| size_t | encoding_length, | ||
| const char * | version, | ||
| size_t | version_length ) |
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. |
| encoding_length | The length of the encoding name in bytes. |
| version | The version of Ruby to answer for, as pm_options_version_set reads it, such as "3.4" or "latest". NULL is the latest version. |
| version_length | The length of the version in bytes, or 0 for NULL. |
| PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_local | ( | const uint8_t * | source, |
| size_t | length, | ||
| const char * | encoding_name, | ||
| size_t | encoding_length, | ||
| const char * | version, | ||
| size_t | version_length ) |
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. |
| encoding_length | The length of the encoding name in bytes. |
| version | The version of Ruby to answer for, as pm_options_version_set reads it, such as "3.4" or "latest". NULL is the latest version. |
| version_length | The length of the version in bytes, or 0 for NULL. |
| 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, | ||
| size_t | encoding_length, | ||
| const char * | version, | ||
| size_t | version_length ) |
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. |
| encoding_length | The length of the encoding name in bytes. |
| version | The version of Ruby to answer for, as pm_options_version_set reads it, such as "3.4" or "latest". NULL is the latest version. |
| version_length | The length of the version in bytes, or 0 for NULL. |