diff options
Diffstat (limited to 'prism/unescape.h')
-rw-r--r-- | prism/unescape.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/prism/unescape.h b/prism/unescape.h index bb0ef315a9..0684a72de0 100644 --- a/prism/unescape.h +++ b/prism/unescape.h @@ -1,13 +1,13 @@ -#ifndef YARP_UNESCAPE_H -#define YARP_UNESCAPE_H +#ifndef PRISM_UNESCAPE_H +#define PRISM_UNESCAPE_H -#include "yarp/defines.h" -#include "yarp/diagnostic.h" -#include "yarp/parser.h" -#include "yarp/util/yp_char.h" -#include "yarp/util/yp_list.h" -#include "yarp/util/yp_memchr.h" -#include "yarp/util/yp_string.h" +#include "prism/defines.h" +#include "prism/diagnostic.h" +#include "prism/parser.h" +#include "prism/util/pm_char.h" +#include "prism/util/pm_list.h" +#include "prism/util/pm_memchr.h" +#include "prism/util/pm_string.h" #include <assert.h> #include <stdbool.h> @@ -18,31 +18,31 @@ typedef enum { // When we're creating a string inside of a list literal like %w, we // shouldn't escape anything. - YP_UNESCAPE_NONE, + PM_UNESCAPE_NONE, // When we're unescaping a single-quoted string, we only need to unescape // single quotes and backslashes. - YP_UNESCAPE_MINIMAL, + PM_UNESCAPE_MINIMAL, // When we're unescaping a string list, in addition to MINIMAL, we need to // unescape whitespace. - YP_UNESCAPE_WHITESPACE, + PM_UNESCAPE_WHITESPACE, // When we're unescaping a double-quoted string, we need to unescape all // escapes. - YP_UNESCAPE_ALL, -} yp_unescape_type_t; + PM_UNESCAPE_ALL, +} pm_unescape_type_t; // Unescape the contents of the given token into the given string using the given unescape mode. -YP_EXPORTED_FUNCTION void yp_unescape_manipulate_string(yp_parser_t *parser, yp_string_t *string, yp_unescape_type_t unescape_type); -void yp_unescape_manipulate_char_literal(yp_parser_t *parser, yp_string_t *string, yp_unescape_type_t unescape_type); +PRISM_EXPORTED_FUNCTION void pm_unescape_manipulate_string(pm_parser_t *parser, pm_string_t *string, pm_unescape_type_t unescape_type); +void pm_unescape_manipulate_char_literal(pm_parser_t *parser, pm_string_t *string, pm_unescape_type_t unescape_type); // Accepts a source string and a type of unescaping and returns the unescaped version. -// The caller must yp_string_free(result); after calling this function. -YP_EXPORTED_FUNCTION bool yp_unescape_string(const uint8_t *start, size_t length, yp_unescape_type_t unescape_type, yp_string_t *result); +// The caller must pm_string_free(result); after calling this function. +PRISM_EXPORTED_FUNCTION bool pm_unescape_string(const uint8_t *start, size_t length, pm_unescape_type_t unescape_type, pm_string_t *result); // Returns the number of bytes that encompass the first escape sequence in the // given string. -size_t yp_unescape_calculate_difference(yp_parser_t *parser, const uint8_t *value, yp_unescape_type_t unescape_type, bool expect_single_codepoint); +size_t pm_unescape_calculate_difference(pm_parser_t *parser, const uint8_t *value, pm_unescape_type_t unescape_type, bool expect_single_codepoint); #endif |