nushell/crates/nu-parser/src
Amirhossein Akhlaghpour 00469de93e
Limit recursion to avoid stack overflow (#7657)
Add recursion limit to `def` and `block`.
Summary of this PR , it will detect if `def` call itself or not .
Then execute by using `stack` which I think best choice to use with this
design and core as it is available in all crates and mutable and
calculate the recursion limit on calling `def`.
Set 50 as recursion limit on `Config`.
Add some tests too .

Fixes #5899

Co-authored-by: Reilly Wood <reilly.wood@icloud.com>
2023-01-04 18:38:50 -08:00
..
deparse.rs fix arg parse (#5754) 2022-06-11 20:52:31 +12:00
errors.rs def: make various punctuation misuses into errors (#7624) 2022-12-31 13:18:53 +02:00
eval.rs Make get hole errors and cell path hole errors identical (improvement on #7002) (#7647) 2023-01-02 14:45:43 -08:00
flatten.rs add missing shapes to default_config (#7472) 2022-12-14 07:11:17 -06:00
known_external.rs Add "fall-through" signatures (#7527) 2022-12-22 00:33:26 +02:00
lex.rs Revert "Pipeline operators: && and ||" (#7452) 2022-12-13 16:36:13 +13:00
lib.rs Small parser refactors (#7568) 2022-12-22 13:41:44 +02:00
lite_parser.rs Small parser refactors (#7568) 2022-12-22 13:41:44 +02:00
parse_keywords.rs Limit recursion to avoid stack overflow (#7657) 2023-01-04 18:38:50 -08:00
parser.rs early return for parsing closure and block with interchanged shape (#7618) 2023-01-01 12:26:51 +02:00
type_check.rs allow tables in ++ operator (#7051) 2022-12-01 00:21:59 +01:00