Ruby 3.3.6p108 (2024-11-05 revision 75015d4c1f6965b5e85e96fb309f1f2129f933c0)
regexp.h File Reference

A regular expression parser. More...

#include "prism/defines.h"
#include "prism/parser.h"
#include "prism/encoding.h"
#include "prism/util/pm_memchr.h"
#include "prism/util/pm_string_list.h"
#include "prism/util/pm_string.h"
#include <stdbool.h>
#include <stddef.h>
#include <string.h>

Go to the source code of this file.

Functions

PRISM_EXPORTED_FUNCTION bool pm_regexp_named_capture_group_names (const uint8_t *source, size_t size, pm_string_list_t *named_captures, bool encoding_changed, const pm_encoding_t *encoding)
 Parse a regular expression and extract the names of all of the named capture groups.
 

Detailed Description

A regular expression parser.

Definition in file regexp.h.

Function Documentation

◆ pm_regexp_named_capture_group_names()

PRISM_EXPORTED_FUNCTION bool pm_regexp_named_capture_group_names ( const uint8_t * source,
size_t size,
pm_string_list_t * named_captures,
bool encoding_changed,
const pm_encoding_t * encoding )

Parse a regular expression and extract the names of all of the named capture groups.

Parameters
sourceThe source code to parse.
sizeThe size of the source code.
named_capturesThe list to add the names of the named capture groups.
encoding_changedWhether or not the encoding changed from the default.
encodingThe encoding of the source code.
Returns
Whether or not the parsing was successful.

Definition at line 634 of file regexp.c.