From c628391e10c6db7ca8b979e20d5b09ac92251c96 Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Sat, 9 May 2026 18:06:25 +0300 Subject: Add RecursionLimit parser error Returns error after 256 levels of nesting to avoid stack overflow. The limit is hardcoded now, but will become a compiler flag later. --- compiler/src/ast/error.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/src/ast/error.rs') diff --git a/compiler/src/ast/error.rs b/compiler/src/ast/error.rs index ced2231..21102ea 100644 --- a/compiler/src/ast/error.rs +++ b/compiler/src/ast/error.rs @@ -19,6 +19,8 @@ pub enum Error { UnclosedLeftPar, UnexpectedEof, + + RecursionLimit, } impl From for Error { -- cgit v1.3