File: test.opa.html

package info (click to toggle)
source-highlight 3.1.9-4.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,612 kB
  • sloc: cpp: 10,202; ansic: 9,521; sh: 4,582; makefile: 1,893; lex: 1,200; yacc: 1,021; javascript: 338; php: 213; perl: 211; awk: 98; erlang: 94; lisp: 90; java: 75; ruby: 69; python: 61; asm: 43; ada: 37; ml: 29; haskell: 27; xml: 23; cs: 11; sql: 8; tcl: 7; sed: 4
file content (40 lines) | stat: -rw-r--r-- 3,267 bytes parent folder | download | duplicates (7)
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
<!-- Generator: GNU source-highlight 
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><i><font color="#9A1900">// single line comment</font></i>
<i><font color="#9A1900">/*</font></i>
<i><font color="#9A1900">/* multi line comment */</font></i>
<i><font color="#9A1900">*/</font></i>

ident `ident` `ident<font color="#990000">+[[</font>'`
<b><font color="#000000">function</font></b><font color="#990000">()</font> <b><font color="#000000">`FuNcTiOn@`</font></b><font color="#990000">(</font><font color="#993399">1</font><font color="#990000">,</font><font color="#993399">2</font><font color="#990000">)</font>

<i><font color="#9A1900">//int/float literals</font></i>
<font color="#993399">1</font> <font color="#993399">1</font><font color="#990000">.</font> <font color="#993399">2.0</font> <font color="#993399">3</font><font color="#990000">.</font> <font color="#993399">5.6e-5</font> <font color="#993399">0x12</font> <font color="#993399">0b0111001</font> <font color="#993399">0o1234567</font> <font color="#990000">-</font><font color="#993399">5.6</font>

<i><font color="#9A1900">//directives</font></i>
<b><font color="#000080">@opensums</font></b> <b><font color="#000080">@private</font></b> <b><font color="#000080">@publish_async</font></b>

<i><font color="#9A1900">//strings literals</font></i>
<font color="#FF0000">"yeay"</font> <font color="#FF0000">"with an expr: {"yeay"}"</font> <font color="#FF0000">"with an expr: {</font><font color="#990000">String.</font><b><font color="#000000">lowercase</font></b><font color="#990000">(</font><font color="#FF0000">"yeay"</font><font color="#990000">)</font><font color="#FF0000">}"</font>

<i><font color="#9A1900">// ids</font></i>
<font color="#990000">&lt;</font>div <font color="#008080">id</font><font color="#990000">=</font><font color="#FF6600">#div</font><font color="#990000">/&gt;</font>

<i><font color="#9A1900">// bypass</font></i>
<font color="#008080">`+`</font> <font color="#990000">=</font> <font color="#FF6600">%% BslPervasives.int_add %%</font>

<i><font color="#9A1900">// bindings</font></i>
<font color="#008080">x</font> <font color="#990000">=</font> <font color="#993399">1</font>
<font color="#008080">`poi`</font> <font color="#990000">=</font> <font color="#993399">1</font>
<i><font color="#9A1900">// type binding</font></i>
<b><font color="#0000FF">type</font></b> <font color="#990000">Queue.</font><font color="#008080">t</font> <font color="#990000">=</font> <font color="#990000">...</font>
<i><font color="#9A1900">// bindings in modules</font></i>
<font color="#008080">Queue</font> <font color="#990000">=</font> <font color="#FF0000">{{</font>
  <b><font color="#000000">pop</font></b><font color="#990000">()</font> <font color="#990000">=</font> <font color="#990000">...</font>
  <font color="#008080">empty</font> <font color="#990000">=</font> <font color="#990000">...</font>
<font color="#FF0000">}}</font>
<i><font color="#9A1900">// bindings in records</font></i>
<font color="#FF0000">{</font><font color="#008080">~a</font> <font color="#008080">~b</font> <font color="#008080">c</font><font color="#990000">=</font><font color="#993399">2</font><font color="#FF0000">}</font>
</tt></pre>