module

ParserLimit

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.

Instance methods

allow_depth?(depth : Int32) : Bool

Returns true if parsing at the given depth may follow imports (i.e. depth < max_depth).

Source
max_depth

Maximum import depth (0 = entry file only). Nil = no limit.

Source
reset

Reset cached state so the environment variable is re-read on next access. Intended for testing only.

Source