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

Method in_misparsed_generic_call

codegraph-kernel/src/dart.rs:1437–1462  ·  view source on GitHub ↗

dartInMisparsedGenericCall (dart.ts) — whether a member access (`.member` on `receiver`, followed by `next` under `parent`) belongs to a misparsed generic call: its callee is called, and a prefixed type argument (`p.Repo`) names a type.

(
        &self,
        receiver: Node<'t>,
        next: Option<Node<'t>>,
        parent: Option<Node<'t>>,
    )

Source from the content-addressed store, hash-verified

1435 /// a misparsed generic call: its callee is called, and a prefixed type
1436 /// argument (`p.Repo`) names a type.
1437 fn in_misparsed_generic_call(
1438 &self,
1439 receiver: Node<'t>,
1440 next: Option<Node<'t>>,
1441 parent: Option<Node<'t>>,
1442 ) -> bool {
1443 let mut after = next;
1444 let mut up = parent;
1445 while after.is_none() {
1446 let Some(u) = up.filter(|u| is_prefixed(u.kind())) else { break };
1447 after = u.next_named_sibling();
1448 up = if after.is_some() { None } else { u.parent() };
1449 }
1450 if let Some(a) = after {
1451 if a.kind() == "relational_operator" && self.misparsed_generic_call(a).is_some() {
1452 return true;
1453 }
1454 }
1455 if parent.map(|p| p.kind()) != Some("relational_expression") {
1456 return false;
1457 }
1458 receiver
1459 .prev_named_sibling()
1460 .map(|b| b.kind() == "relational_operator" && self.misparsed_generic_call(b).is_some())
1461 .unwrap_or(false)
1462 }
1463
1464 /// dartCalleeOfArgPart (dart.ts:100-116).
1465 fn callee_of_arg_part(&self, arg_part: Node<'t>) -> Option<String> {

Callers 1

extract_member_readMethod · 0.80

Calls 3

is_prefixedFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected