summaryrefslogtreecommitdiff
path: root/prism/regexp.h
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2023-10-31 11:35:56 -0400
committerKevin Newton <[email protected]>2023-11-01 13:10:29 -0400
commit1de05631b50140c8510be0bf4413cc8b10fcd74b (patch)
treeabba1337ca74f2eeb9dcd046ddd8e91d69f2937a /prism/regexp.h
parentaffa6714bc90fd99d29cda092db007d626914af5 (diff)
[ruby/prism] Documentation for diagnostics and regexp
https://github.com/ruby/prism/commit/16e0579044
Diffstat (limited to 'prism/regexp.h')
-rw-r--r--prism/regexp.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/prism/regexp.h b/prism/regexp.h
index 5745512dee..9eae245d1e 100644
--- a/prism/regexp.h
+++ b/prism/regexp.h
@@ -12,8 +12,17 @@
#include <stddef.h>
#include <string.h>
-// Parse a regular expression and extract the names of all of the named capture
-// groups.
+/**
+ * Parse a regular expression and extract the names of all of the named capture
+ * groups.
+ *
+ * @param source The source code to parse.
+ * @param size The size of the source code.
+ * @param named_captures The list to add the names of the named capture groups.
+ * @param encoding_changed Whether or not the encoding changed from the default.
+ * @param encoding The encoding of the source code.
+ * @return Whether or not the parsing was successful.
+ */
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, pm_encoding_t *encoding);
#endif