@@ -56,6 +56,7 @@ def parse_file(file_path: str, language: str = None, verbose: bool = False) -> L
5656 method_list  =  parser .get_function_list (_cls )
5757 for  method  in  method_list :
5858 method_info  =  parser .get_function_metadata (method )
59+  method_info ['code' ] =  get_node_text (method )
5960 cls_method .append (method_info )
6061
6162 cls_info ["method" ] =  cls_method 
@@ -88,7 +89,8 @@ def print_result(res: Dict, file_name: str = "no_name_file"):
8889
8990 # ========= Print class & method ========= 
9091 cls_headers  =  ["#" , "Class" , "Arguments" ]
91-  cls_method_headers  =  ["#" , "Method name" , "Paramters" , "Type" , "Return type" ]
92+  cls_method_headers  =  ["#" , "Method name" , "Paramters" , 
93+  "Type" , "Return type" , "Throws" ]
9294 cls_info  =  []
9395 method_info  =  {}
9496 for  cls_idx , _cls  in  enumerate (res ["class" ]):
@@ -116,6 +118,11 @@ def print_result(res: Dict, file_name: str = "no_name_file"):
116118 if  i  <=  1  and  method ["return_type" ] !=  "<not_specific>" 
117119 else  "" 
118120 )
121+  sublist [5 ] =  (
122+  method ["throws" ]
123+  if  i  <=  1  and  "throws"  in  method .keys ()
124+  else  "" 
125+  )
119126 _method_info .append (sublist )
120127
121128 method_info [file_name ] =  [_cls ["identifier" ], _method_info ]
0 commit comments