You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially I agreed with you that this behaviour is weird, but upon looking into it, this is how js behaves.
while the language of our expressions isn't exactly js, the parser we use is built to parse js so trying to avoid this situation is going to be very hard to do, and will likely result in a lot of effort over time to keep the workaround working.
I need to think on this some more to figure out if this is something we should support, or if I want to call this behaviour 'expected'
As a workaround, you could add a semicolon to your expression to force the parser to interpret it as separate statements:
Maybe this could be resolved with an after-token hook which looks for a CallExpression where the open parenthesis is the first token on a new line? I'm not sure if the parser gives out enough info about context to detect this
Is this a bug in companion itself or a module?
Is there an existing issue for this?
Describe the bug
When I'm using Expressions in a Press Action or a Trigger, the paren processing is inconsistent.
Examples:
This works:
This does not:
But this works:
This does not work:
This works:
The second example should parse correctly. I assume it must think "{string}" is a function name?
Steps To Reproduce
Expected Behavior
I would expect lines after a string to parse correctly.
Environment (please complete the following information)
Additional context
No response
The text was updated successfully, but these errors were encountered: