TPY lang - alploskov/kithon Wiki

tpy-lang is DSL based on yaml and jinja2 or used to create syntax translation rules, macros. You can also write code in yaml + python and python will be automatically replaced with jinja2 code.

All template have this parameters:

Core elements

To add a syntax translation rule, the following construction is used:

name_of_construction: "{{part1}} {{part2}}"

for example name in php:

name: "${{name}}"

Here you can find a list of root elements and their parameters

Macros

These are special functions created using tpy-lang in the configuration files. The result of their execution is code in the target language.

Syntax:

macros_name:
  args: []
  code: "Jinja code"
  side_effect: "Python code"
  alt_name: ""
  type: ""
  ret_type: ""

Attributes

Modules

Operators overloading