shelljs-transpiler
shelljs-transpiler copied to clipboard
Unable to parse script
First attempted use of sh2js and it gives me;
Unable to parse script Line 26, col 26: 25 | function isint {
26 | expr $1 + 0 >/dev/null 2>&1 && return 0 ^ 27 | return 1 Expected "}" Please include this output in the bug report
The "}" it's looking for is on the next line;
# isint - is integer?
function isint {
expr $1 + 0 >/dev/null 2>&1 && return 0
return 1
}
#
I agree that the above is ugly.
Do simpler functions work? How about:
function sayHello {
echo "hello"
return 0
}
This is probably because we don't support && and || yet (issue #19). I haven't worked on this project in a while unfortunately. Let me know if you're interested in adding support for that feature.
It does indeed work for simple functions.
If I get some time I will take a look at what's required to add && and ||.
Is there a list of what all is left to implement?
If I get some time I will take a look at what's required to add && and ||.
Cool! I'll post some thoughts on #19.
Is there a list of what all is left to implement?
Unfortunately no. I've filed github issues for the most obvious missing features. I would recommend playing with the web playground to get a feel for the state of the project.