module
Noir::PerlCalleeExtractor
Included Modules
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
- #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
Public String overload kept for callers outside this module.
- #extract_sub_at(chars : Array(Char), sub_index : Int32, limit : Int32 = chars.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
Public String overload kept for callers outside this module.
- #find_matching_delimiter(chars : Array(Char), open_index : Int32, open_char : Char, close_char : Char, limit : Int32 = chars.size) : Int32 | Nil
-
#line_number_for(source : String, index : Int32) : Int32
Public String overload kept for callers outside this module.
- #line_number_for(chars : Array(Char), index : Int32) : Int32
- #named_sub_bodies(source : String, file_path : String) : Hash(String, SubBody)
-
#strip_non_code(source : String) : String
Public String overload kept for callers outside this module.
- #strip_non_code(chars : Array(Char)) : String
Instance methods inherited from module Noir::CalleeExtractorBase
attach_to(endpoint : Endpoint, callees : Array(Entry))
attach_to
Instance Method Detail
Public String overload kept for callers outside this module.
Public String overload kept for callers outside this module.
Public String overload kept for callers outside this module.
Walk characters up to index counting newlines — the previous
source[0...limit].count('\n') allocated a full substring on every
call (handler body extraction, named-sub indexing). index is a
character offset (matches source.chars / String#size indexing),
not a UTF-8 byte offset.
Public String overload kept for callers outside this module.