module Noir::JSCalleeExtractor

Extended Modules

Defined in:

miniparsers/js_callee_extractor.cr

Constant Summary

EVENT_HANDLER_CALLS = Set {"defineEventHandler", "eventHandler", "defineCachedEventHandler", "cachedEventHandler"}
FALLBACK_RESERVED_CALLEES = Set {"catch", "for", "function", "if", "return", "switch", "while"}
HTTP_VERB_METHODS = {"get" => "GET", "post" => "POST", "put" => "PUT", "delete" => "DELETE", "del" => "DELETE", "patch" => "PATCH", "head" => "HEAD", "options" => "OPTIONS", "trace" => "TRACE", "connect" => "CONNECT", "all" => "ALL"}

Instance Method Summary

Instance Method Detail

def callees_for_default_event_handler(source : String, file_path : String, *, language : Symbol = :javascript) : Array(Entry) #

[View source]
def callees_for_exported_function(source : String, file_path : String, export_name : String) : Array(Entry) #

[View source]
def callees_for_function_body(body : String, file_path : String, open_brace_line : Int32, *, language : Symbol = :javascript) : Array(Entry) #

[View source]
def callees_for_handler_node(handler : LibTreeSitter::TSNode, source : String, file_path : String) : Array(Entry) #

[View source]
def callees_for_routes(source : String, file_path : String) : Hash(String, Array(Entry)) #

[View source]
def route_key(method : String, path : String, line : Int32) : String #

[View source]