Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So yeah, pattern matching. Hooray.
goto
in the main match function in order to keep the stack under control, and this has been preserved with slight alterations in order to accommodate Go's stricter rules on where you can and can't jump to. In my research, it appears that Go stacks are (nearly) infinite, but I'm not sure that means converting the jumps to recursive function calls is necessarily a good idea..Also, my apologies, but I actually started this branch midway through #67, so I would merge that before looking at this. I also added a little helpful bit to the Lua test harness that returns the error string off the stack if one exists when running the test suite - if you would rather that be in a separate pull request, it can be backed out.