forked from PrismJS/prism
/
prism-tremor.html
82 lines (67 loc) · 1.29 KB
/
prism-tremor.html
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
<h2>Comments</h2>
<pre><code># Single line comment
### Module level documentation comment
## Statement level documentation comment
# Regular code comment
</code></pre>
<h2>Strings</h2>
<pre><code>
# double quote single line strings
"foo \"bar\" baz"
# heredocs or multiline strings
"""
{ "snot": "badger" }
"""
</code></pre>
<h2>Variables</h2>
<pre><code>
# Immutable constants
const snot = "fleek";
# Mutable variables
let badger = "flook";
</code></pre>
<h2>Operators</h2>
<pre><code>
merge {} of
{ "snot": "badger" }
end;
patch {} of
insert snot = "badger"
end;
</code></pre>
<h2>Functions and keywords</h2>
<pre><code>
fn fib_(a, b, n) of
case (a, b, n) when n > 0 => recur(b, a + b, n - 1)
default => a
end;
fn fib(n) with
fib_(0, 1, n)
end;
fib(event)
</code></pre>
<h2>Queries</h2>
<pre><code>
define script fib
script
fn fib_(a, b, n) of
case (a, b, n) when n > 0 => recur(b, a + b, n - 1)
default => a
end;
fn fib(n) with
fib_(0, 1, n)
end;
{ "fib": fib(event.n) }
end;
create script fib;
select event.n from in into fib;
select event from fib into out;
</code></pre>
<h2>Deployments</h2>
<pre><code>
define pipeline passthrough
pipeline
select event from in into out;
end;
deploy pipeline passthrough;
</code></pre>