Browse Source

Shell/PosixParser: Correctly parse the OR_IF token

This fixes an unfortunate typo where we would parse the OR_IF token as
an AST::And node. Now, it is parsed into an AST::Or node :^).
david072 1 year ago
parent
commit
0e1bd54896
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Shell/PosixParser.cpp

+ 1 - 1
Userland/Shell/PosixParser.cpp

@@ -799,7 +799,7 @@ ErrorOr<RefPtr<AST::Node>> Parser::parse_and_or()
             auto rhs = TRY(parse_pipeline());
             if (!rhs)
                 return RefPtr<AST::Node> {};
-            node = make_ref_counted<AST::And>(
+            node = make_ref_counted<AST::Or>(
                 node->position(),
                 *node,
                 rhs.release_nonnull(),