From a45b2ea6fb1917de9c2833764f3acf0cdf4e7eab Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Fri, 5 Mar 2021 16:33:23 +0330 Subject: Shell: Add support for 'immediate' expressions as variable substitutions This commit adds a few basic variable substitution operations: - length Find the length of a string or a list - length_across Find the lengths of things inside a list - remove_{suffix,prefix} Remove a suffix or a prefix from all the passed values - regex_replace Replace all matches of a given regex with a given template - split Split the given string with the given delimiter (or to its code points if the delimiter is empty) - concat_lists concatenates any given lists into one Closes #4316 (the ancient version of this same feature) --- Userland/Shell/NodeVisitor.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Userland/Shell/NodeVisitor.h') diff --git a/Userland/Shell/NodeVisitor.h b/Userland/Shell/NodeVisitor.h index e252ec4ebd..6d45bc3ab1 100644 --- a/Userland/Shell/NodeVisitor.h +++ b/Userland/Shell/NodeVisitor.h @@ -53,6 +53,7 @@ public: virtual void visit(const AST::HistoryEvent*); virtual void visit(const AST::Execute*); virtual void visit(const AST::IfCond*); + virtual void visit(const AST::ImmediateExpression*); virtual void visit(const AST::Join*); virtual void visit(const AST::MatchExpr*); virtual void visit(const AST::Or*); @@ -68,6 +69,7 @@ public: virtual void visit(const AST::StringLiteral*); virtual void visit(const AST::StringPartCompose*); virtual void visit(const AST::SyntaxError*); + virtual void visit(const AST::SyntheticNode*); virtual void visit(const AST::Tilde*); virtual void visit(const AST::VariableDeclarations*); virtual void visit(const AST::WriteAppendRedirection*); -- cgit v1.2.3