Open alexflint opened 1 year ago
Hi @alexflint
There is a feature called globalStore
which does provide what you are looking for. Search the documentation on https://pkg.go.dev/github.com/mna/pigeon for this keyword or have a look at the example in https://github.com/mna/pigeon/tree/master/test/global_store.
I hope this helps.
Is there any way that I can pass a variable into each of the bits of Go code that handle parse results in my grammar file? I would like to pass an
io.Writer
and write to it from inside the handlers in my grammar file. I don't want it to be a global variable, though.