module
Noir::PerlCalleeExtractor
Extended Modules
Defined in:
miniparsers/perl_callee_extractor.crConstant Summary
-
BARE_CALL_REGEX =
/(?<![A-Za-z0-9_:>$])([A-Za-z_][A-Za-z0-9_]*)\s*(?:\(|(?=\s+(?:[A-Za-z_$'"]|\{|\[)))/ -
METHOD_CALL_REGEX =
/(\$?[A-Za-z_][A-Za-z0-9_]*(?:::[A-Za-z_][A-Za-z0-9_]*)*)\s*->\s*([A-Za-z_][A-Za-z0-9_]*)(?![A-Za-z0-9_])\s*(?:\(|(?=\s*(?:[A-Za-z_$'"]|\{|\[|;|,|\)|\}|$)))/ -
QUALIFIED_CALL_REGEX =
/(?<![A-Za-z0-9_:])([A-Za-z_][A-Za-z0-9_]*(?:::[A-Za-z_][A-Za-z0-9_]*)+)\s*(?:\(|(?=\s+(?:[A-Za-z_$'"]|\{|\[)))/ -
RESERVED =
Set {"and", "cmp", "continue", "do", "else", "elsif", "eq", "eval", "for", "foreach", "ge", "given", "gt", "if", "last", "le", "lt", "my", "ne", "next", "no", "not", "our", "package", "return", "state", "sub", "unless", "until", "use", "when", "while", "bless", "caller", "chomp", "chop", "close", "defined", "delete", "die", "each", "exists", "grep", "join", "keys", "length", "map", "open", "pop", "print", "push", "qw", "q", "qq", "qr", "ref", "scalar", "shift", "sort", "split", "sprintf", "undef", "unshift", "values", "wantarray", "warn"} -
STANDARD_MODULES =
Set {"Carp", "Data::Dumper", "Encode", "File::Spec", "JSON", "List::Util", "Mojo::Base", "Mojolicious::Lite", "strict", "warnings"}
Instance Method Summary
- #attach_to(endpoint : Endpoint, callees : Array(Entry))
- #callees_for_body(body : String, file_path : String, start_line : Int32) : Array(Entry)
- #controller_action_callees(source : String, file_path : String) : Hash(String, Array(Entry))
- #extract_sub_after(source : String, start_index : Int32, search_limit : Int32 = source.size, body_limit : Int32 = source.size) : Tuple(String, Int32) | Nil
- #extract_sub_at(source : String, sub_index : Int32, limit : Int32 = source.size) : Tuple(String, Int32) | Nil
- #find_matching_delimiter(source : String, open_index : Int32, open_char : Char, close_char : Char, limit : Int32 = source.size) : Int32 | Nil
- #line_number_for(source : String, index : Int32) : Int32
- #named_sub_bodies(source : String, file_path : String) : Hash(String, SubBody)
- #strip_non_code(source : String) : String
Instance Method Detail
def extract_sub_after(source : String, start_index : Int32, search_limit : Int32 = source.size, body_limit : Int32 = source.size) : Tuple(String, Int32) | Nil
#
def extract_sub_at(source : String, sub_index : Int32, limit : Int32 = source.size) : Tuple(String, Int32) | Nil
#