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
|
<html>
<head>
<title>SCDoc syntax color test</title>
<link rel='stylesheet' href='./scdoc.css' type='text/css' />
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src="prettify.js" type="text/javascript"></script>
<script src="lang-sc.js" type="text/javascript"></script>
</head>
<style>
body {
margin: 1em;
}
</style>
<body onload="prettyPrint()">
<h2>Syntax Color Test</h2>
<p>
<div class="str">► Strings</div>
<div class="kwd">► Special values like true, nil</div>
<div class="com">► Comments</div>
<div class="typ">► Class names</div>
<div class="lit">► Numbers and character literals</div>
<div class="pun">► Punctuation</div>
<div class="pln">► Plain text, methods and variable names</div>
<div class="tag">► Special variables like super, thisProcess</div>
<div class="dec">► Declarations like var, const</div>
<div class="atn">► Symbols</div>
<div class="atv">► Environment vars</div>
<pre class="code prettyprint lang-sc">
/* Some example nonsense code to test syntax coloring */
~foo = SomeClass.new(\abc, 123, "xyz") { |one, two, three=42.7|
var myVariable, test = pi*5, bool = true;
if ((two & one) < 3) { // A comment...
"hello".postln;
(abc: $x, def: \y, ghi: nil);
} {
[~bar, zoo, thisProcess.platform];
};
};
Routine {
inf.do {|i|
("count"+i).postln;
5.0.rand.wait;
};
}.play;
</pre>
</body>
</html>
|