module
Noir::HaskellCalleeExtractor
Included Modules
Extended Modules
Defined in:
miniparsers/haskell_callee_extractor.crConstant Summary
-
BIND_CALL_REGEX =
/(?:<-|=)\s*([a-z_][A-Za-z0-9_']*)(?=\s|$|\()/ -
BRANCH_CALL_REGEX =
/(?:->|\bthen\b|\belse\b)\s*([a-z_][A-Za-z0-9_']*)(?=\s|$|\()/ -
DOLLAR_CALL_REGEX =
/\$\s*([a-z_][A-Za-z0-9_']*)(?=\s|$|\()/ -
PAREN_CALL_REGEX =
/[(,]\s*([a-z_][A-Za-z0-9_']*)(?=\s|$|\()/ -
QUALIFIED_CALL_REGEX =
/(?<![A-Za-z0-9_'.])((?:[A-Z][A-Za-z0-9_']*\.)+[a-z_][A-Za-z0-9_']*)(?![A-Za-z0-9_'])/ -
No trailing
\bon the captured name.\bafter[A-Za-z0-9_']*is redundant whenever the name ends in a word character (the greedy class has already consumed every one of them), and it is unsatisfiable when the name ends in a prime:\bwould demand a word character after the'while the lookahead demands whitespace / EOL /(. So the only thing it ever did was forcego'to backtrack down togo— or, with the lookahead, fail to match at all. -
RESERVED =
Set {"as", "case", "class", "data", "default", "deriving", "do", "else", "family", "forall", "foreign", "hiding", "if", "import", "in", "infix", "infixl", "infixr", "instance", "let", "module", "newtype", "of", "qualified", "then", "type", "where", "return", "pure", "fmap", "map", "filter", "foldl", "foldr", "id", "const", "show", "read", "print", "putStrLn", "length", "null", "not", "and", "or", "maybe", "either", "fst", "snd"} -
STATEMENT_CALL_REGEX =
/^\s*([a-z_][A-Za-z0-9_']*)(?=\s|$|\()/
Instance Method Summary
- #callees_for_body(body : String, file_path : String, start_line : Int32) : Array(Entry)
- #function_bodies(content : String, file_path : String) : Array(FunctionBody)