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

Syntax errors for binary operations #27

Open
DaRasch opened this issue Mar 19, 2017 · 4 comments
Open

Syntax errors for binary operations #27

DaRasch opened this issue Mar 19, 2017 · 4 comments

Comments

@DaRasch
Copy link

DaRasch commented Mar 19, 2017

I got syntax errors for using ~, <<, >>, but looking at the table of opcodes in c_compile, they seem to be supported. So I guess the parser messes up here?

@linleyh
Copy link
Owner

linleyh commented Mar 19, 2017

<< should work. I just checked >> and there was a simple mistake in the parser that I'll fix in the next update - thanks for picking that up! ~ isn't currently implemented, and neither are >>= or <<=.

@DaRasch
Copy link
Author

DaRasch commented Mar 19, 2017

Thanks for the quick fix. No ~ is rather unfortunate, but I'll make do with -1 ^ x until then.

@linleyh
Copy link
Owner

linleyh commented Mar 19, 2017

Actually I was wrong; ~ is in there but when I implemented it at first I didn't realise that it was a unary operator, and I haven't fixed it yet. So it should work if you put a dummy value in front of it, e.g. number = 1 ~ x; (here the 1 is ignored and the ~ is applied to x).

@DaRasch
Copy link
Author

DaRasch commented Mar 19, 2017

Cool, thanks again.

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