Closed hwittenborn closed 1 year ago
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.
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?