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

Function is_literal_receiver

codegraph-kernel/src/tsjs/mod.rs:103–117  ·  view source on GitHub ↗

LITERAL_RECEIVER_TYPES (tree-sitter.ts) — full set; only a handful occur in TS/JS grammars but membership is what the TS code tests.

(kind: &str)

Source from the content-addressed store, hash-verified

101/// LITERAL_RECEIVER_TYPES (tree-sitter.ts) — full set; only a handful occur in
102/// TS/JS grammars but membership is what the TS code tests.
103fn is_literal_receiver(kind: &str) -> bool {
104 matches!(
105 kind,
106 "string" | "string_literal" | "interpreted_string_literal" | "raw_string_literal"
107 | "template_string" | "concatenated_string" | "formatted_string" | "f_string"
108 | "line_string_literal" | "string_content" | "heredoc_body"
109 | "number" | "number_literal" | "integer" | "integer_literal" | "float"
110 | "float_literal" | "int_literal" | "decimal_integer_literal" | "real_literal"
111 | "char_literal" | "character_literal" | "rune_literal" | "regex" | "regex_literal"
112 | "true" | "false" | "boolean_literal" | "bool_literal" | "none" | "null" | "nil"
113 | "null_literal" | "undefined"
114 | "list" | "list_literal" | "array" | "array_literal" | "array_creation_expression"
115 | "dictionary" | "dict_literal" | "object" | "tuple" | "set"
116 )
117}
118
119/// BUILTIN_TYPES (tree-sitter.ts) — names that never become type references.
120fn is_builtin_type(name: &str) -> bool {

Callers 1

extract_callMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected