A word that may stand between such a keyword and the name (`static ref X`, * `const unsafe fn f`). */
| 3058 | /* A word that may stand between such a keyword and the name (`static ref X`, |
| 3059 | * `const unsafe fn f`). */ |
| 3060 | static bool rs_item_modifier(const char *t) { |
| 3061 | static const char *const words[] = {"ref", "mut", "unsafe", "async", "extern"}; |
| 3062 | for (size_t i = 0; i < sizeof(words) / sizeof(words[0]); i++) { |
| 3063 | if (strcmp(words[i], t) == 0) { |
| 3064 | return true; |
| 3065 | } |
| 3066 | } |
| 3067 | return false; |
| 3068 | } |
| 3069 | |
| 3070 | static bool rs_delimiter(const char *t, bool open) { |
| 3071 | return open ? (strcmp(t, "(") == 0 || strcmp(t, "[") == 0 || strcmp(t, "{") == 0) |