MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_literal_receiver

Function is_literal_receiver

codegraph-kernel/src/swift.rs:68–82  ·  view source on GitHub ↗

LITERAL_RECEIVER_TYPES (tree-sitter.ts:373) — full shared set. Note the swift-relevant membership quirks: `line_string_literal` IS in it, `multi_line_string_literal` and `dictionary_literal` are NOT.

(kind: &str)

Source from the content-addressed store, hash-verified

66/// swift-relevant membership quirks: `line_string_literal` IS in it,
67/// `multi_line_string_literal` and `dictionary_literal` are NOT.
68fn is_literal_receiver(kind: &str) -> bool {
69 matches!(
70 kind,
71 "string" | "string_literal" | "interpreted_string_literal" | "raw_string_literal"
72 | "template_string" | "concatenated_string" | "formatted_string" | "f_string"
73 | "line_string_literal" | "string_content" | "heredoc_body"
74 | "number" | "number_literal" | "integer" | "integer_literal" | "float"
75 | "float_literal" | "int_literal" | "decimal_integer_literal" | "real_literal"
76 | "char_literal" | "character_literal" | "rune_literal" | "regex" | "regex_literal"
77 | "true" | "false" | "boolean_literal" | "bool_literal" | "none" | "null" | "nil"
78 | "null_literal" | "undefined"
79 | "list" | "list_literal" | "array" | "array_literal" | "array_creation_expression"
80 | "dictionary" | "dict_literal" | "object" | "tuple" | "set"
81 )
82}
83
84/// `/^[A-Za-z_]\w*$/` with JS's ASCII `\w`.
85fn ascii_ident_re() -> &'static Regex {

Callers 1

extract_callMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected