Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadFile and loadDirectory report syntax errors when there is a ^ Continuation after a * conditional #314

Open
elisehein opened this issue Jun 14, 2019 · 3 comments

Comments

@elisehein
Copy link

elisehein commented Jun 14, 2019

I'm under the impression that this is valid syntax:

+ Hello
* <get variable> == 1 =>
^ Value is 1
- Value is not 1

However, loadFile and loadDirectory both report an error in this case:

Syntax error: Invalid format for !Condition: should be like '* value symbol value => response' at hello.rive line 2 near * <get variable> == 1 =>

I'm able to run the script after loading even though it logs an error.

The error doesn't appear if I put the conditional all on one line, or if I end the * Conditional line with a \s.

@dcsan
Copy link
Contributor

dcsan commented Jun 15, 2019

theoretically it maybe legal but maybe the parser is just getting confused by the empty stuff before the linebreak.

* <get variable> == 1 => Value is 1

should work?

@elisehein
Copy link
Author

@dcsan that does work fine. I have rather long lines in my scripts though and I'd much prefer splitting lines after the => for readability.

@dcsan
Copy link
Contributor

dcsan commented Jun 15, 2019

maybe you can put some text on the same line... and just use ^ for the continuation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants