File: prism-tremor.html

package info (click to toggle)
node-prismjs 1.30.0%2Bdfsg%2B~1.26.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,220 kB
  • sloc: javascript: 27,628; makefile: 9; sh: 7; awk: 4
file content (82 lines) | stat: -rw-r--r-- 1,322 bytes parent folder | download | duplicates (2)
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>