rable 0.2.0

A Rust implementation of the Parable bash parser — complete GNU Bash 5.3-compatible parsing with Python bindings
Documentation
# Parser gaps discovered from Oils test suite
# https://github.com/oilshell/oil

# === Comments with special characters ===

=== single quote in comment
echo hi # don't worry
---
(command (word "echo") (word "hi"))
---


=== parenthesis in comment
echo hi # (note)
---
(command (word "echo") (word "hi"))
---


=== parenthesis mid-comment
echo hi # see (foo) for details
---
(command (word "echo") (word "hi"))
---


=== comment immediately after hash
echo hi #(note)
---
(command (word "echo") (word "hi"))
---


# === Comments after compound commands ===

=== comment after fi
if true; then echo; fi  # comment
---
(if (command (word "true")) (command (word "echo")))
---


=== comment after done
while true; do echo; done  # comment
---
(while (command (word "true")) (command (word "echo")))
---


=== comment after esac
case $x in a) echo;; esac  # comment
---
(case (word "$x") (pattern ((word "a")) (command (word "echo"))))
---


=== comment after brace group
{ echo; }  # comment
---
(brace-group (command (word "echo")))
---


# === Line continuation after && and || ===

=== newline after &&
echo a &&
echo b
---
(and (command (word "echo") (word "a")) (command (word "echo") (word "b")))
---


=== newline after ||
echo a ||
echo b
---
(or (command (word "echo") (word "a")) (command (word "echo") (word "b")))
---


=== newline after && in test
[[ $x == y ]] &&
echo yes
---
(and (cond (cond-binary "==" (cond-term "$x") (cond-term "y"))) (command (word "echo") (word "yes")))
---


=== multiple newlines after &&
echo a &&

echo b
---
(and (command (word "echo") (word "a")) (command (word "echo") (word "b")))
---