1: doctype "calculator-logic-0_2_1.g.etl";
2:
3: let dozen1 = {
4: var rc = 0;
5: var n = 12;
6: while outer (true) {
7: while(true) {
8: if(n < 1) {
9: break outer;
10: } else {
11: n = n - 1;
12: rc = rc + 1;
13: continue outer;
14: };
15: };
16: };
17: rc;
18: };
19: assert dozen1 == 12;
20: let dozen2 = {
21: var a = 420;
22: var b = 96;
23: while(a != 0) {
24: if(a < b) {
25: let t = a;
26: a = b;
27: b = t;
28: };
29: a = a - b;
30: };
31: b;
32: };
33:
34: assert dozen2 == 12;
35: assert "\\" ==~ R"\\";
36: assert "\\abba\\" ==~ R".\w{4,}.";
37: assert ! "\\a+ba\\" ==~ R".\w{4,}.";
38: assert "1111" == "\x31\u0031\U31;\U0000031;";
39: assert (if(1==2) 11) == null;
40: assert (if(false) 11 else 11 + 11) == 22;
41: assert (if(true) 11 else 11 + 11) == 11;
42: