Repeat string by morenol · Pull Request #162 · jinja2cpp/Jinja2Cpp (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

@morenol

flexferrum

@flexferrum

@morenol

Something that I think that needs to be addressed in the future is the raising of errors if there are expressions with unsupported operands,

I mean:
{{ 'Hello' + 3 }} and {{ 'Hello' - 'Hello' }} should raise an error, shouldn't it?

@codecov

@flexferrum

Something that I think that needs to be addressed in the future is the raising of errors if there are expressions with unsupported operands,

That's a good idea but it's hard to implement. Problem here not in BinaryOperatorVisitor, but in diagnostic. We should store file location for each AST node (both statements and expressions). And this addition breaks the backward compatibility, so it should be enabled/disabled from the TemplateEnv settings.

2 participants

@morenol @flexferrum