LITERAL_RECEIVER_TYPES (tree-sitter.ts) — full set; membership is what the TS code tests even though only a few kinds occur in the c/cpp grammars.
(kind: &str)
| 176 | /// LITERAL_RECEIVER_TYPES (tree-sitter.ts) — full set; membership is what the |
| 177 | /// TS code tests even though only a few kinds occur in the c/cpp grammars. |
| 178 | fn is_literal_receiver(kind: &str) -> bool { |
| 179 | matches!( |
| 180 | kind, |
| 181 | "string" | "string_literal" | "interpreted_string_literal" | "raw_string_literal" |
| 182 | | "template_string" | "concatenated_string" | "formatted_string" | "f_string" |
| 183 | | "line_string_literal" | "string_content" | "heredoc_body" |
| 184 | | "number" | "number_literal" | "integer" | "integer_literal" | "float" |
| 185 | | "float_literal" | "int_literal" | "decimal_integer_literal" | "real_literal" |
| 186 | | "char_literal" | "character_literal" | "rune_literal" | "regex" | "regex_literal" |
| 187 | | "true" | "false" | "boolean_literal" | "bool_literal" | "none" | "null" | "nil" |
| 188 | | "null_literal" | "undefined" |
| 189 | | "list" | "list_literal" | "array" | "array_literal" | "array_creation_expression" |
| 190 | | "dictionary" | "dict_literal" | "object" | "tuple" | "set" |
| 191 | ) |
| 192 | } |
| 193 | |
| 194 | /// stripCppTemplateArgs (languages/c-cpp.ts): depth-counted removal of every |
| 195 | /// balanced `<…>` group; `<` and `>` never reach the output. |