LITERAL_RECEIVER_TYPES (tree-sitter.ts:373) — full shared set.
(kind: &str)
| 48 | |
| 49 | /// LITERAL_RECEIVER_TYPES (tree-sitter.ts:373) — full shared set. |
| 50 | fn is_literal_receiver(kind: &str) -> bool { |
| 51 | matches!( |
| 52 | kind, |
| 53 | "string" | "string_literal" | "interpreted_string_literal" | "raw_string_literal" |
| 54 | | "template_string" | "concatenated_string" | "formatted_string" | "f_string" |
| 55 | | "line_string_literal" | "string_content" | "heredoc_body" |
| 56 | | "number" | "number_literal" | "integer" | "integer_literal" | "float" |
| 57 | | "float_literal" | "int_literal" | "decimal_integer_literal" | "real_literal" |
| 58 | | "char_literal" | "character_literal" | "rune_literal" | "regex" | "regex_literal" |
| 59 | | "true" | "false" | "boolean_literal" | "bool_literal" | "none" | "null" | "nil" |
| 60 | | "null_literal" | "undefined" |
| 61 | | "list" | "list_literal" | "array" | "array_literal" | "array_creation_expression" |
| 62 | | "dictionary" | "dict_literal" | "object" | "tuple" | "set" |
| 63 | ) |
| 64 | } |
| 65 | |
| 66 | /// `/^[A-Za-z_]\w*$/` with JS's ASCII `\w` (getReturnType's ident test). |
| 67 | fn ascii_ident_re() -> &'static Regex { |