module Noir::PhpCalleeExtractor

Extended Modules

Defined in:

miniparsers/php_callee_extractor.cr

Constant Summary

BARE_CALL_REGEX = /(?<![>\w:$\\])(\\?[A-Za-z_]\w*(?:\\[A-Za-z_]\w*)*)\s*\(/
CLASS_PROPERTY_CALL_REGEX = /(\\?[A-Za-z_]\w*(?:\\[A-Za-z_]\w*)*::\$\w+(?:\s*->\s*[A-Za-z_]\w*\s*(?:\(\s*\))?)*\s*->\s*[A-Za-z_]\w*)\s*\(/
OBJECT_CALL_REGEX = /(?<!:)(\$[A-Za-z_]\w*(?:\s*->\s*[A-Za-z_]\w*\s*(?:\(\s*\))?)*\s*->\s*[A-Za-z_]\w*)\s*\(/
RESERVED = Set {"array", "catch", "class", "clone", "declare", "die", "echo", "elseif", "empty", "eval", "exit", "fn", "for", "foreach", "function", "global", "if", "include", "include_once", "isset", "list", "match", "print", "require", "require_once", "return", "static", "switch", "throw", "trait", "try", "unset", "use", "while"}
STATIC_CALL_REGEX = /(\\?[A-Za-z_]\w*(?:\\[A-Za-z_]\w*)*(?:::[A-Za-z_]\w*)+)\s*\(/

Instance Method Summary

Instance Method Detail

def attach_to(endpoint : Endpoint, callees : Array(Entry)) #

[View source]
def callees_for_body(body : String, file_path : String, start_line : Int32) : Array(Entry) #

[View source]
def strip_comment(line : String) : String #

[View source]