-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ideas for language.txt
95 lines (76 loc) · 2.1 KB
/
Ideas for language.txt
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Ideas for language
Verbs
=====
= set
+ add
- delete
g group
!g ungroup
t toggle
ls list
Adjectives
==========
x by
~ at / to
from from
all all
first first
last last
e enter
ex exit
Objects
=======
con container
spr sprite
txt text
gfx graphics
tex texture
frm frame (tex + rect)
sel selection
pt point
rect rect
sz size (width, height)
col color (rbga)
deg angle
regexp
path
[name:expr] dict
[exprs] list
expr .. expr range
' ' string
name$ variable
number / hex
Syntax
======
; separator
? expr block if
|? expr block else if
| block else
?{ } query
@ expr fn each
@? expr block while
args -> block fn
<- expr return
brk break
name args fn call
{ start
} end
// | /* */ comments
.name property
& and
| or
! not
Examples
========
+sel{mc last} // add selection, start selection, move cursor to last, end selection
x$ = 110 * 2
?x$>123{-all sel}|{sel all} // if x > 123 then delete all selections else select all
? x$ > 123 {
dc
} | {
sa
}
?{.width<10&.height>10} // from all cursors, query all with .width < 10 and .height > 10
x$=0;@?x$<10{x$++} // x=0 while x < 10 do x++
10..100x2 // range from 10 to 100 by 2
?{.x == x$ & .y == y$]} // query all touching point x, y