MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeText-parser / get_comment_node

Method get_comment_node

src/codetext/parser/go_parser.py:15–24  ·  view source on GitHub ↗

Return all comment node inside a parent node Args: node (tree_sitter.Node) Return: List: list of comment nodes

(function_node)

Source from the content-addressed store, hash-verified

13
14 @staticmethod
15 def get_comment_node(function_node):
16 """
17 Return all comment node inside a parent node
18 Args:
19 node (tree_sitter.Node)
20 Return:
21 List: list of comment nodes
22 """
23 comment_node = get_node_by_kind(function_node, kind='comment')
24 return comment_node
25
26 @staticmethod
27 def get_docstring_node(node):

Callers 1

test_get_comment_listMethod · 0.45

Calls 1

get_node_by_kindFunction · 0.85

Tested by 1

test_get_comment_listMethod · 0.36