I was trying out the binary-template plugin after your announcement on Reddit and encountered a parse error. It took me forever to boil it down to a reproducible case because the error message implied it was the function signature that was the problem. However, it turned out one of the statements down in the function that was the problem all along
Given:
void thisFunctionIsBad() {
local char c = '0';
}
it produces
...ns/REHex.app/Contents/PlugIns/binary-template/parser.lua:109: Parse error at /Applications/REHex.app/Contents/PlugIns/binary-template/templates/bob.bt:1 (at 'void thisFu')
instead of
Parse error at /Applications/REHex.app/Contents/PlugIns/binary-template/templates/bob.bt:2 (at "= '")
or similar
In hindsight (as with all good bugs!), I noticed that the docs actually don't mention character literals, so it was my "C muscle memory" leaking through. Given that it appears to be inspired by the 010 language, their strings page does seem to imply that single quotes are allowed, but it's unclear if they differ from just using " or when one would use which style
I was trying out the binary-template plugin after your announcement on Reddit and encountered a parse error. It took me forever to boil it down to a reproducible case because the error message implied it was the function signature that was the problem. However, it turned out one of the statements down in the function that was the problem all along
Given:
it produces
instead of
or similar
In hindsight (as with all good bugs!), I noticed that the docs actually don't mention character literals, so it was my "C muscle memory" leaking through. Given that it appears to be inspired by the 010 language, their strings page does seem to imply that single quotes are allowed, but it's unclear if they differ from just using
"
or when one would use which style