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

Solving expression in conditionals #9

Open
burlog opened this issue May 17, 2015 · 1 comment
Open

Solving expression in conditionals #9

burlog opened this issue May 17, 2015 · 1 comment
Assignees

Comments

@burlog
Copy link

burlog commented May 17, 2015

Hi all, I don't know how to implement solving expressions with current aproach.
Majority of template engines have if statements that can contains expressions like django does:

{% if somevar == "x" %}
  This appears if variable somevar equals the string "x"
{% endif %}

There is no callback like render or test that can satisfy this functionality in simple way. Would not it be better to merge render and test to something like select_value that will return selected value back to dispatching machine. And then it can solve expressions in common way?

@mjcaisse
Copy link
Member

Hello burlog -

The AST for the VM has a node called vm::ast::condition. This data structure will be enhanced to fully support expressions.

@mjcaisse mjcaisse self-assigned this May 19, 2015
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