Open Ph0enixKM opened 3 weeks ago
wouldn't that mean that we'd have to reimplement translator for each bash version? kinda seems like overkill for me
Nope. We could get the version in the syntax module
I can create a draft to better visualize this. Bash version 3 isnβt a different language. We could just determine if translating one syntax formula can lead to a bit different representation in resulting Bash.
We could add a flag
--out-version=X
in scope of this issue to determine which bash version output should be produced to keep outputted Bash be the most readable possible. By default we'd support Bash 2.--out-version=3
--out-version=2
Also we could replace
seq
in range generation for Bash 3 with{a..b}
syntax. Example syntax:--out-version=3
--out-version=2