Jinja2Cpp
Jinja2Cpp copied to clipboard
Support for index-based arrays slicing
Jinja2 index operator [] follows the python arrays slicing semantic: https://stackoverflow.com/questions/509211/understanding-slice-notation
It needs to be supported.
For the parser, it looks like ParseSubscript() is to be updated to support [ : : ].
For the evaluator, I think SubscriptExpression::Evaluate is the one to edit, but I don't quite understand how / the types that are involved in that method. Can I get any suggestion please?
For the evaluator
I've considered to add new AST node for this purpose, something like SliceExpression, because indexing and slicing has got too different behavior.