Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

fp-tera-tpl

This package is an attempt to port the famous Tera template engine into Free Pascal.

Anyone may press Interesting, signed in or not. It helps others find this project.

In the Online Package Manager

Install it from inside Lazarus through Package, Online Package Manager.

Member rating

No ratings yet.

Sign in to rate this project.

README

Tera Templates

This package is an attempt to port the famous Tera template engine into Free Pascal.

Objectives

  • [x] Implement full AST on the engine.
  • [x] Implement {{ <variable> }}.
  • [x] Implement filters: {{ <variable> | <filter> | <filter> }}.
  • [x] Implement {% include "<filename>" %}.
  • [x] Implement {% if <expression> %}, {% else %} and {% endif %}.
  • [x] Implement decent expression parser for {% if <expression> %} with AST.
  • [x] Implement {% for <variable> in <variable_array> %} and {% enfor %}.
  • [ ] Implement full battery of tests.
  • [ ] Implement {%- and -%} for TrimLeft and TrimRight.

Examples

There are examples: Examples Folder

Package

You can find the package here: Packages Folder