| 1 |
-- https://github.com/Cirru/cirru-gopher/blob/master/code/scope.cr, |
| 2 |
|
| 3 |
set a (int 2) |
| 4 |
|
| 5 |
print (self) |
| 6 |
|
| 7 |
set c (child) |
| 8 |
|
| 9 |
under c |
| 10 |
under parent |
| 11 |
print a |
| 12 |
|
| 13 |
print $ get c a |
| 14 |
|
| 15 |
set c x (int 3) |
| 16 |
print $ get c x |
| 17 |
|
| 18 |
set just-print $ code |
| 19 |
print a |
| 20 |
|
| 21 |
print just-print |
| 22 |
|
| 23 |
eval (self) just-print |
| 24 |
eval just-print |
| 25 |
|
| 26 |
print (string "string with space") |
| 27 |
print (string "escapes \n \"\\") |
| 28 |
|
| 29 |
brackets ((((())))) |
| 30 |
|
| 31 |
"eval" $ string "eval" |
| 32 |
|
| 33 |
print (add $ (int 1) (int 2)) |
| 34 |
|
| 35 |
print $ unwrap $ |
| 36 |
map (a $ int 1) (b $ int 2) |
| 37 |
|
| 38 |
print a |
| 39 |
int 1 |
| 40 |
, b c |
| 41 |
int 2 |
| 42 |
, d |