class AnalyzerPython

Direct Known Subclasses

Defined in:

analyzer/analyzers/analyzer_python.cr

Constant Summary

HTTP_METHOD_NAMES = ["get", "post", "put", "patch", "delete", "head", "options", "trace"]
INDENT_SPACE_SIZE = 4
REGEX_PYTHON_VARIABLE_NAME = "[a-zA-Z_][a-zA-Z0-9_]*"

Instance Method Summary

Instance methods inherited from class Analyzer

analyze analyze, base_path : String base_path, logger : NoirLogger logger, result : Array(Endpoint) result, url : String url

Constructor methods inherited from class Analyzer

new(options : Hash(String, String)) new

Macros inherited from class Analyzer

define_getter_methods(names) define_getter_methods

Instance Method Detail

def find_imported_modules(app_base_path : String, file_path : String, content : String | Nil = nil) : Hash(String, Tuple(String, Int32)) #

[View source]
def find_imported_package(package_path : String, dotted_as_names : String) : Array(Tuple(String, String, Int32)) #

[View source]
def find_json_params(codeblock_lines : Array(String), json_variable_names : Array(String)) : Array(Param) #

[View source]
def parse_function_definition(source_lines : Array(String), start_index : Int) : FunctionDefinition | Nil #

[View source]
def parse_function_or_class(data : String | Array(String), after : Regex | Nil = nil) : String | Nil #

[View source]
def return_literal_value(data : String) : String #

[View source]