Closed ezsh closed 3 years ago
Example 3 for Maybe-Next and example 7 for Grouping seem to contradict each other? BTW, string |+ (string &+ string)
results in a parsing error (complains on absent closing parenthesis).
Patched in v0.13.1! string |+ string &+ string
and string |+ (string &+ string)
should work.
This pull-request https://github.com/cyrusfirheir/twee3-language-tools/pull/43 fixes the issue you were facing to behave correctly. None of the sugarcube macros actually use that form, which means that path was far less tested than it should have been.
The documentation was incorrect, example 3 is the correct version. Grouping example 7 was from how it behaved when I was first making the feature (it was just left to right), but that was incorrect now (since &+
binds 'harder' than |+
). Thanks for pointing that out, fixed by PR https://github.com/cyrusfirheir/twee3-language-tools/pull/44 .
Though, I wasn't able to reproduce the parsing error for string |+ (string &+ string)
.
As Cyrus says, it should hopefully be patched. Thanks for opening the issue.
I want to add a definition for a macro that takes either a single or three parameters. This exact case is covered in the wiki page (
a |+ b&+ c
). However, given the following definition:and the code
<<NPC "Captain">>
, the extension complains "Expected type 'string' but there was no argumentsc2-ex(109)".A workaround
works fine.