module ParserLimit
Overview
Parser limits from environment (e.g. for large repos).
NOIR_PARSER_MAX_DEPTH When set, miniparsers stop following imports beyond this depth. Depth 0 = entry file only; 1 = entry + direct imports; etc. Unset or negative = no limit.
Extended Modules
Defined in:
utils/parser_limit.crInstance Method Summary
-
#allow_depth?(depth : Int32) : Bool
Returns true if parsing at the given depth may follow imports (i.e.
-
#max_depth : Int32 | Nil
Maximum import depth (0 = entry file only).
-
#reset
Reset cached state so the environment variable is re-read on next access.
Instance Method Detail
def allow_depth?(depth : Int32) : Bool
#
Returns true if parsing at the given depth may follow imports (i.e. depth < max_depth).
def reset
#
Reset cached state so the environment variable is re-read on next access. Intended for testing only.