Skip to content

Instantly share code, notes, and snippets.

{ function j(string) { return string.join('') } }
template =
(
interpolation /
tag /
$(!interpolation !tag .)
)+
ws = (" " / "\n")*

ABAP

{% def random n:1 %}
  {% if n|equal 1|or (n|is_a "float") %}
    {{|rand|times n}}
  {% else %}
    {{|rand|times n|round}}
  {% end %}
{% end %}