-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyntax_test_utl.utl
75 lines (61 loc) · 1.34 KB
/
syntax_test_utl.utl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<html>
<head>
</head>
<body>
[%-
string = 'foo';
num = 123;
float = 10.5;
bool = true;
other_bool = false;
nil = null;
array1 = [1,2,3,4,5];
array2 = ['1','2','3'];
array3 = ['foo':'bar', 'baz':9];
array3.key1 = 'new value';
array3.key2 = "new value";
echo array3.foo;
echo array3['baz'];
echo array2[0];
foreach array1 as item;
echo item;
end;
num += 2;
num -= 1;
num *= 2;
num /= 1;
string2 = 'foo' + 'bar' + 2;
if num == num2 then echo 'stuff';
if num > num2 then echo 'stuff';
if num >= num2 then echo 'stuff';
if num < num2 then echo 'stuff';
if num <= num2 then echo 'stuff';
if bool && bool2 || bool3 then echo 'yolo';
if bool then echo 'bool is true';
if other_bool;
echo 'cool things';
end;
array = [];
/* this is a comment */
/*
This is a multi
line comment
*/
macro foo(param1, param2, param3);
echo things;
end;
foo('param1':'test', thing, 'param3':['foo':'bar']);
macro foo2();
return things;
end;
-%]
<div>
[%- num -%]
[%- macro bar(baz, oSettings=['test':'foo']) -%]
[%-
echo 'magic';
-%]
[%- end -%]
</div>
</body>
</html>