MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / lisp_definition_head

Function lisp_definition_head

internal/cbm/extract_calls.c:596–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596static bool lisp_definition_head(CBMLanguage lang, TSNode head, const char *source) {
597 static const char *const clojure_scheme_racket_heads[] = {"defn",
598 "defn-",
599 "def",
600 "defmacro",
601 "defmulti",
602 "defmethod",
603 "defprotocol",
604 "defrecord",
605 "deftype",
606 "definterface",
607 "defonce",
608 "define",
609 "define-syntax",
610 "define-values",
611 "define-syntax-rule",
612 "define-struct",
613 "define-record-type",
614 "define/contract",
615 "struct",
616 NULL};
617 static const char *const common_lisp_heads[] = {
618 "defun", "defmacro", "defgeneric", "defmethod", "defvar", "defparameter",
619 "defconstant", "deftype", "defstruct", "defclass", NULL};
620
621 return call_node_text_in(head, source,
622 lang == CBM_LANG_COMMONLISP ? common_lisp_heads
623 : clojure_scheme_racket_heads);
624}
625
626static bool lisp_list_is_definition_role(CBMLanguage lang, TSNode node, const char *source) {
627 uint32_t count = ts_node_named_child_count(node);

Callers 1

Calls 1

call_node_text_inFunction · 0.85

Tested by

no test coverage detected