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

Determine value of conditional expressions #159

Open
stevehalliwell opened this issue Nov 14, 2022 · 3 comments
Open

Determine value of conditional expressions #159

stevehalliwell opened this issue Nov 14, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@stevehalliwell
Copy link
Owner

Presently if is a statement, not expression, doesn't allow

var a = if(true) 1 else 0;
@stevehalliwell stevehalliwell added the enhancement New feature or request label Nov 14, 2022
@stevehalliwell
Copy link
Owner Author

If match exists, that should also be able to run as expression

@stevehalliwell
Copy link
Owner Author

Yes, we should do this. Introduce if_exp, that asks for exp not statements or flag internally in the compilation state that we are looking for statements or exp?

@stevehalliwell
Copy link
Owner Author

Or allow the user of a return in an if_exp and treat it as a function call OR attempt de-sugar it as such?

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

No branches or pull requests

1 participant