You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking into making some sort-of custom syntax for a project I'm working on:
It would be sort of like the Bats @test syntax, but would ommit the @test part and change the string part after it to have no quotes like so:
package {
# Anything in here is normal shell syntax again, until the closing `}` is found.a_function() { true; }
echo"Run commands, and do any normal shell stuff in here"
}
It's also like just defining a package() { ... } function, I'm just wanting to omit the () for stylistic purposes in my program.
Does the public API expose anything to do the things I'm looking for? If not, would there be anywhere in the codebase you'd recommend I'd look at if a fork would be necessary?
The text was updated successfully, but these errors were encountered:
There is no easy API for you to do this, no - you would have to modify the recursive descent parser to allow for it. Looking at how the Bats syntax is implemented would be a good start. I don't think we want to have API for supporting arbitrary syntax like this, because I'm not even sure what the API would look like. A soft fork seems like a good way to experiment.
Repository owner
locked and limited conversation to collaborators
May 30, 2023
I was looking into making some sort-of custom syntax for a project I'm working on:
It would be sort of like the Bats
@test
syntax, but would ommit the@test
part and change the string part after it to have no quotes like so:It's also like just defining a
package() { ... }
function, I'm just wanting to omit the()
for stylistic purposes in my program.Does the public API expose anything to do the things I'm looking for? If not, would there be anywhere in the codebase you'd recommend I'd look at if a fork would be necessary?
The text was updated successfully, but these errors were encountered: