File: highlight.boo.html

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (44 lines) | stat: -rw-r--r-- 2,937 bytes parent folder | download
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
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.boo</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Boo) - Theme (Breeze Light)"/>
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
<span style="color:#898887">"""module docstring"""</span>

<span style="color:#924c9d">namespace</span> My.NameSpace <span style="color:#898887">#optional namespace declaration</span>

<span style="color:#924c9d">import</span> Assembly.Reference <span style="color:#898887">#import statements</span>

<span style="color:#898887">#followed by the Members of this module (classes, methods, etc.)</span>
<span style="font-weight:bold">class</span> MyClass:
    <span style="font-weight:bold">pass</span>

<span style="font-weight:bold">def</span> domyfunction<span style="color:#ca60ca">(</span>it<span style="color:#ca60ca">)</span>:
    <span style="color:#0057ae">print</span><span style="color:#ca60ca">(</span>it<span style="color:#ca60ca">)</span>

<span style="color:#898887">#start "main" section that is executed when script is run</span>
x <span style="color:#924c9d">as</span> <span style="color:#0057ae">int</span>
x <span style="color:#ca60ca">=</span> <span style="color:#b08000">3</span>
domyfunction<span style="color:#ca60ca">(</span>x<span style="color:#ca60ca">)</span>

<span style="color:#898887">#optional assembly attribute declarations used when compiling</span>
[assembly: AssemblyTitle<span style="color:#ca60ca">(</span><span style="color:#bf0303">'foo'</span><span style="color:#ca60ca">)</span>]
[assembly: AssemblyDescription<span style="color:#ca60ca">(</span><span style="color:#bf0303">'bar'</span><span style="color:#ca60ca">)</span>]

<span style="color:#924c9d">import</span> MyLibrary
<span style="color:#0057ae">print</span> <span style="color:#ca60ca">(</span>Version<span style="color:#ca60ca">)</span>
doit<span style="color:#ca60ca">()</span>

[Module]
<span style="font-weight:bold">class</span> MainClass:
    <span style="font-weight:bold">public</span> <span style="font-weight:bold">static</span> Version <span style="color:#924c9d">as</span> <span style="color:#0057ae">string</span>

    <span style="font-weight:bold">static</span> <span style="font-weight:bold">def</span> <span style="font-weight:bold">constructor</span><span style="color:#ca60ca">()</span>:
        Version <span style="color:#ca60ca">=</span> <span style="color:#bf0303">"0.1"</span>

<span style="font-weight:bold">def</span> doit<span style="color:#ca60ca">()</span>:
    <span style="color:#898887">#you can refer to "globals" from within your library, too:</span>
    <span style="color:#0057ae">print</span><span style="color:#ca60ca">(</span><span style="color:#bf0303">"This library's version is: "</span><span style="color:#ca60ca">+</span>MainClass.Version<span style="color:#ca60ca">)</span>

</pre></body></html>