jellyfin-web/dashboard-ui/bower_components/prism/tests/languages/elixir/capture_feature.test
2016-02-03 18:00:01 -05:00

28 lines
743 B
Plaintext

fun = &Math.zero?/1
(&is_function/1).(fun)
fun = &(&1 + 1)
&List.flatten(&1, &2)
----------------------------------------------------
[
"fun ", ["operator", "="],
["capture", "&Math.zero?/1"],
["punctuation", "("],
["capture", "&is_function/1"],
["punctuation", ")"],
["punctuation", "."],
["punctuation", "("], "fun", ["punctuation", ")"],
"\r\nfun ", ["operator", "="],
["capture", "&"],
["punctuation", "("], ["argument", "&1"],
["operator", "+"], ["number", "1"], ["punctuation", ")"],
["capture", "&List.flatten"],
["punctuation", "("], ["argument", "&1"],
["punctuation", ","], ["argument", "&2"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for function capturing and arguments.