Debian Codegraph @

autotests/html/highlight.boo.dark.html

raw
1 <!DOCTYPE html>
2 <html><head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <title>highlight.boo</title>
5 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (Boo) - Theme (Breeze Dark)"/>
6 </head><body style="background-color:#232629;color:#cfcfc2"><pre>
7 <span style="color:#7a7c7d;">&quot;&quot;&quot;module docstring&quot;&quot;&quot;</span>
8
9 <span style="color:#3daee9;">namespace</span> My.NameSpace <span style="color:#7a7c7d;">#optional namespace declaration</span>
10
11 <span style="color:#3daee9;">import</span> Assembly.Reference <span style="color:#7a7c7d;">#import statements</span>
12
13 <span style="color:#7a7c7d;">#followed by the Members of this module (classes, methods, etc.)</span>
14 <span style="font-weight:bold;">class</span> MyClass:
15 <span style="color:#fdbc4b;font-weight:bold;">pass</span>
16
17 <span style="font-weight:bold;">def</span> domyfunction<span style="color:#3f8058;">(</span>it<span style="color:#3f8058;">)</span>:
18 <span style="color:#2980b9;">print</span><span style="color:#3f8058;">(</span>it<span style="color:#3f8058;">)</span>
19
20 <span style="color:#7a7c7d;">#start &quot;main&quot; section that is executed when script is run</span>
21 x <span style="color:#3daee9;">as</span> <span style="color:#2980b9;">int</span>
22 x <span style="color:#3f8058;">=</span> <span style="color:#f67400;">3</span>
23 domyfunction<span style="color:#3f8058;">(</span>x<span style="color:#3f8058;">)</span>
24
25 <span style="color:#7a7c7d;">#optional assembly attribute declarations used when compiling</span>
26 [assembly: AssemblyTitle<span style="color:#3f8058;">(</span><span style="color:#f44f4f;">'foo'</span><span style="color:#3f8058;">)</span>]
27 [assembly: AssemblyDescription<span style="color:#3f8058;">(</span><span style="color:#f44f4f;">'bar'</span><span style="color:#3f8058;">)</span>]
28
29 <span style="color:#3daee9;">import</span> MyLibrary
30 <span style="color:#2980b9;">print</span> <span style="color:#3f8058;">(</span>Version<span style="color:#3f8058;">)</span>
31 doit<span style="color:#3f8058;">()</span>
32
33 [Module]
34 <span style="font-weight:bold;">class</span> MainClass:
35 <span style="font-weight:bold;">public</span> <span style="font-weight:bold;">static</span> Version <span style="color:#3daee9;">as</span> <span style="color:#2980b9;">string</span>
36
37 <span style="font-weight:bold;">static</span> <span style="font-weight:bold;">def</span> <span style="font-weight:bold;">constructor</span><span style="color:#3f8058;">()</span>:
38 Version <span style="color:#3f8058;">=</span> <span style="color:#f44f4f;">&quot;0.1&quot;</span>
39
40 <span style="font-weight:bold;">def</span> doit<span style="color:#3f8058;">()</span>:
41 <span style="color:#7a7c7d;">#you can refer to &quot;globals&quot; from within your library, too:</span>
42 <span style="color:#2980b9;">print</span><span style="color:#3f8058;">(</span><span style="color:#f44f4f;">&quot;This library's version is: &quot;</span><span style="color:#3f8058;">+</span>MainClass.Version<span style="color:#3f8058;">)</span>
43
44 </pre></body></html>