forked from PrismJS/prism
/
capture_feature.test
56 lines (51 loc) · 1.33 KB
/
capture_feature.test
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
&Math.zero?(0)
fun = &Math.zero?/1
(&is_function/1).(fun)
fun = &(&1 + 1)
&List.flatten(&1, &2)
fun = &Math.zero?/invalid
----------------------------------------------------
[
["operator", "&"],
["module", "Math"],
["punctuation", "."],
["function", "zero?" ],
["punctuation", "("],
["number", "0"],
["punctuation", ")"],
"\r\nfun ", ["operator", "="],
["operator", "&"],
["module", "Math"],
["punctuation", "."],
["function", "zero?" ],
["operator", "/"],
["number", "1"],
["punctuation", "("],
["operator", "&"],
["function", "is_function"],
["operator", "/"],
["number", "1"],
["punctuation", ")"],
["punctuation", "."],
["punctuation", "("], "fun", ["punctuation", ")"],
"\r\nfun ", ["operator", "="],
["operator", "&"],
["punctuation", "("], ["argument", "&1"],
["operator", "+"], ["number", "1"], ["punctuation", ")"],
["operator", "&"],
["module", "List"],
["punctuation", "."], ["function", "flatten"],
["punctuation", "("], ["argument", "&1"],
["punctuation", ","], ["argument", "&2"],
["punctuation", ")"],
"\r\n\r\nfun ",
[ "operator", "=" ],
[ "operator", "&" ],
[ "module", "Math" ],
[ "punctuation", "." ],
"zero?",
[ "operator", "/" ],
"invalid"
]
----------------------------------------------------
Checks for function capturing and arguments.