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

Function is_literal_receiver

codegraph-kernel/src/tsjs/mod.rs:76–90  ·  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

74/// LITERAL_RECEIVER_TYPES (tree-sitter.ts) — full set; only a handful occur in
75/// TS/JS grammars but membership is what the TS code tests.
76fn is_literal_receiver(kind: &str) -> bool {
77 matches!(
78 kind,
79 "string" | "string_literal" | "interpreted_string_literal" | "raw_string_literal"
80 | "template_string" | "concatenated_string" | "formatted_string" | "f_string"
81 | "line_string_literal" | "string_content" | "heredoc_body"
82 | "number" | "number_literal" | "integer" | "integer_literal" | "float"
83 | "float_literal" | "int_literal" | "decimal_integer_literal" | "real_literal"
84 | "char_literal" | "character_literal" | "rune_literal" | "regex" | "regex_literal"
85 | "true" | "false" | "boolean_literal" | "bool_literal" | "none" | "null" | "nil"
86 | "null_literal" | "undefined"
87 | "list" | "list_literal" | "array" | "array_literal" | "array_creation_expression"
88 | "dictionary" | "dict_literal" | "object" | "tuple" | "set"
89 )
90}
91
92/// BUILTIN_TYPES (tree-sitter.ts) — names that never become type references.
93fn is_builtin_type(name: &str) -> bool {

Callers 1

extract_callMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected