Open andresmakesgames opened 1 month ago
I think this is actually a bug in our parser! The parser is reading “return”, thinking it’s the return
keyword, and getting confused from there. (This doesn’t happen with other keywords like if
, because those are actually defined to include a space afterwards to prevent this issue.)
Until a fix for this lands, you can temporarily work around this problem by changing the name of your command to not begin with the word “return”.
Yup, I figured it would be something like that. That makes sense to me! Thanks, Jon. It's not that annoying, and I'll just name the function "backToMainMenu".
What is the current behavior?
The Yarn Spinner VSCode extension reports a problem in my Yarn file, "Unexpected "T" while reading a return statement", when reading the command
<<returnToMainMenu>>
Please provide the steps to reproduce, and if possible a minimal demo of the problem:
The only issue is the report in VSCode. This does not manifest in any problems during execution of the application - the custom function is still parsed and called as expected, and works fine.
What is the expected behavior?
No error message.
Please tell us about your environment:
Other information
I'm somewhat at a loss. I don't know VS Extensions well enough to diagnose!