Example #1
0
 def setUp(self):
     self.ext = FanInOut()
     self.lizard_object = FileAnalyzer(get_extensions(
         ["io", "ns", "nd"])).analyze_source_code("a.cpp", """int foo(){
                                                                           bar();
                                                                           if(a){
                                                                               b;
                                                                           }
                                                                       }
                                                           int bar(){foo();};""")
Example #2
0
def get_cpp_function_list_with_extnesion(source_code, extension):
    return FileAnalyzer(get_extensions([extension])).analyze_source_code(
        "a.cpp", source_code).function_list
Example #3
0
def get_cpp_fileinfo_with_extension(source_code, extension):
    return FileAnalyzer(get_extensions([extension])).analyze_source_code(
        "a.cpp", source_code)
Example #4
0
def get_python_function_list_with_extension(source_code, extension):
    return FileAnalyzer(get_extensions([extension])).analyze_source_code(
        "a.py", source_code).function_list
Example #5
0
 def process(ext, code):
     result = FileAnalyzer(get_extensions([ext])).analyze_source_code(
         "a.cpp", code)
     list(ext.cross_file_process([result]))
     return result
Example #6
0
 def process(ext, code):
     result = FileAnalyzer(get_extensions([ext])).analyze_source_code(
         "a.cpp", code)
     ext.reduce(result)
     return result
Example #7
0
 def setUp(self):
     self.analyzer = FileAnalyzer()