module Noir::SwiftCalleeExtractor

Extended Modules

Defined in:

miniparsers/swift_callee_extractor.cr

Constant Summary

BARE_CALL_REGEX = /(?<![.\w])([A-Za-z_]\w*)\s*(\(|\{)/
RECEIVER_CALL_REGEX = /([A-Za-z_]\w*(?:\??\.[A-Za-z_]\w*)+)\s*(?:\(|\{)/
RESERVED = Set {"as", "associatedtype", "break", "case", "catch", "class", "continue", "default", "defer", "deinit", "do", "else", "enum", "extension", "fallthrough", "false", "fileprivate", "for", "func", "guard", "if", "import", "in", "init", "inout", "internal", "is", "let", "nil", "open", "operator", "private", "protocol", "public", "repeat", "return", "self", "Self", "static", "struct", "subscript", "super", "switch", "throw", "throws", "true", "try", "typealias", "var", "where", "while", "await"}

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, in_block_comment : Bool = false) : String #

[View source]
def strip_comment_with_state(line : String, in_block_comment : Bool) : Tuple(String, Bool) #

[View source]
def strip_non_code_with_state(line : String, block_comment_depth : Int32, in_multiline_string : Bool) : Tuple(String, Int32, Bool) #

[View source]