[ruby/prism] Document remaining encodings

b9510aed40
This commit is contained in:
Kevin Newton 2023-11-30 12:52:42 -05:00
parent 0c277f2b76
commit 99a147ff4f
3 changed files with 3 additions and 4 deletions

View file

@ -4214,7 +4214,7 @@ pm_encoding_shift_jis_char_width(const uint8_t *b, ptrdiff_t n) {
/** /**
* This is the definition of all of the encodings that we support. * This is the definition of all of the encodings that we support.
*/ */
static const pm_encoding_t pm_encodings[PM_ENCODING_MAXIMUM] = { static const pm_encoding_t pm_encodings[] = {
[PM_ENCODING_UTF_8] = { [PM_ENCODING_UTF_8] = {
.name = "UTF-8", .name = "UTF-8",
.char_width = pm_encoding_utf_8_char_width, .char_width = pm_encoding_utf_8_char_width,

View file

@ -213,8 +213,7 @@ typedef enum {
PM_ENCODING_WINDOWS_1257, PM_ENCODING_WINDOWS_1257,
PM_ENCODING_WINDOWS_1258, PM_ENCODING_WINDOWS_1258,
PM_ENCODING_WINDOWS_31J, PM_ENCODING_WINDOWS_31J,
PM_ENCODING_WINDOWS_874, PM_ENCODING_WINDOWS_874
PM_ENCODING_MAXIMUM
} pm_encoding_type_t; } pm_encoding_type_t;
/** /**

View file

@ -84,7 +84,7 @@ module Prism
assert_includes(symbols, "pm_version") assert_includes(symbols, "pm_version")
end end
names(local_nm_symbols(@libprism_so)).tap do |symbols| names(local_nm_symbols(@libprism_so)).tap do |symbols|
assert_includes(symbols, "pm_encoding_shift_jis_isupper_char") assert_includes(symbols, "pm_encoding_utf_8_isupper_char")
end end
# TODO: someone who uses this library needs to finish this test # TODO: someone who uses this library needs to finish this test
end end