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

Is it possible to add an operator that is both right-hand-side-only and can act as a normal one? #159

Closed
Yazwh0 opened this issue Apr 14, 2023 · 2 comments

Comments

@Yazwh0
Copy link
Contributor

Yazwh0 commented Apr 14, 2023

So in 6502 asm we use '<' '>' and '^' to denote high, low and top bytes.

eg

var a = #<$abcd ; equals 0xab

But I also need to be able to support greater\less than.

eg

var b = 1
var a = #<(b < 5 ? $abcd : $1234) ; should also equal 0xab

It feels like these are 'unary operators' but they seem to be handled in a very unique way, and not definable by extending the class?

Does anyone know if there is there a more cunning way, or do I need to hack up the Regex?

I know the original author had left this project -- which is a shame, as its really good! -- but hoping someone else might know?

@Yazwh0
Copy link
Contributor Author

Yazwh0 commented Apr 15, 2023

I think I have this working using unary operators in a new PR #160

@codingseb
Copy link
Owner

Your PR has been included in version 1.4.40.0.
Thanks for your work @Yazwh0

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