Skip to content

Repeat string #162

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

Merged
merged 1 commit into from
Oct 9, 2019
Merged

Repeat string #162

merged 1 commit into from
Oct 9, 2019

Conversation

morenol
Copy link
Contributor

@morenol morenol commented Oct 8, 2019

Solves #158

@flexferrum
Copy link
Collaborator

Thanks!

@morenol
Copy link
Contributor Author

morenol commented Oct 8, 2019

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
Copy link

codecov bot commented Oct 8, 2019

Codecov Report

Merging #162 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #162      +/-   ##
==========================================
+ Coverage   88.21%   88.22%   +0.01%     
==========================================
  Files          65       65              
  Lines        8305     8317      +12     
==========================================
+ Hits         7326     7338      +12     
  Misses        979      979
Impacted Files Coverage Δ
test/expressions_test.cpp 84.05% <ø> (ø) ⬆️
src/value_visitors.h 66.74% <100%> (+0.95%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c85814e...4695028. Read the comment docs.

@flexferrum flexferrum merged commit fff06d6 into jinja2cpp:master Oct 9, 2019
@flexferrum
Copy link
Collaborator

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.

@morenol morenol deleted the mulstring branch October 14, 2019 01:30
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

Successfully merging this pull request may close these issues.

2 participants