What's New
Core Language Features
- Added macro support with
{% macro %}
and{% endmacro %}
blocks - Added break and continue statement support for loops
- Added ternary expressions and improved
if-else
parsing withelif
support - Added spread expressions (
*args
) for function argument unpacking - Added comment support with
{# #}
syntax - Added null literal support (
none
,None
)
Template Processing
- Added custom transformers-specific
generation
tag support - Added string concatenation operator (
~
) and multiple string literal support - Enhanced set statements with body support and
{% endset %}
blocks - Added
for-else
loops with{% else %}
blocks
String Manipulation
- Added new filters:
capitalize
,replace
,split
with maxsplit,join
- Enhanced
startswith
/endswith
filters with tuple argument support - Added
items
,keys
,values
methods for object iteration - Added trimming functions:
strip
,lstrip
,rstrip
Data Processing
- Added Python-style negative array indexing (e.g.,
messages[-1]
) - Added new filters:
tojson
,map
,indent
- Added proper numeric type handling with
IntegerValue
andFloatValue
- Added support for both lowercase and uppercase boolean literals
Fixes
- Fixed undefined array key errors in parser and lexer with proper bounds checking
- Improved error messages and exception handling throughout
- Enhanced parser architecture with better statement detection
- Added
JsonSerializable
interface to runtime values
Breaking Changes
None - all changes are backward compatible.
New Contributors
Full Changelog: 1.0.0...2.0.0