From e489a2db5a1e56e66f6df12642ad8cfd988d4b30 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 16 Sep 2026 11:28:14 +0000 Subject: implement subshell, and fix vector operator[] unvalid index --- include/eval.h | 5 +++-- include/lexer/ast.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/eval.h b/include/eval.h index 5c819a4..214a1ae 100644 --- a/include/eval.h +++ b/include/eval.h @@ -1,11 +1,12 @@ #pragma once #include "all.h" -#include "lexer/token.h" +#include "lexer/lexer_class.h" namespace ov4 { - +int eval_exe(const std::string &s, bool is_aync); +int eval_tree_cd(size_t i, const T_lexer &lexer_instance, bool inside_subshell); void eval(char *cmdline); } diff --git a/include/lexer/ast.h b/include/lexer/ast.h index d4b0fd5..871afaf 100644 --- a/include/lexer/ast.h +++ b/include/lexer/ast.h @@ -21,6 +21,9 @@ public: size_t left = string::npos; size_t right = string::npos; + // if this is marked as `subshell` + // it will fork a subshell + // then the subshell will handler the rest bool subshell; }; -- cgit v1.3.1-4-g156e