codex 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +8 -0
- data/LICENSE.txt +29 -0
- data/Manifest.txt +95 -0
- data/PostInstall.txt +5 -0
- data/README.txt +31 -0
- data/Rakefile +4 -0
- data/app_generators/codex/USAGE +5 -0
- data/app_generators/codex/codex_generator.rb +106 -0
- data/app_generators/codex/templates/Rakefile +54 -0
- data/app_generators/codex/templates/bin/build_all.rb +47 -0
- data/app_generators/codex/templates/bin/postprocess_all.rb +5 -0
- data/app_generators/codex/templates/bin/pressie.rb +7 -0
- data/app_generators/codex/templates/code/control/basic_continuation.rb +11 -0
- data/app_generators/codex/templates/code/control/cc_throw_catch.rb +59 -0
- data/app_generators/codex/templates/code/control/closure_continuation.rb +8 -0
- data/app_generators/codex/templates/code/control/closure_continuation_2.rb +12 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CSS.html +115 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CSharp.html +134 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CollapseCode.html +90 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Cpp.html +190 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CrashTest.html +108 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Delphi.html +112 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/FirstLine.html +90 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Index.html +80 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Java.html +122 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/JavaScript.html +112 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/NoControls.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/NoGutter.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/PHP.html +102 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Python.html +121 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Ruby.html +131 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/SQL.html +98 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/clipboard.swf +0 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCSharp.js +32 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCpp.js +73 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCss.js +52 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushDelphi.js +34 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushJScript.js +22 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushJava.js +28 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushPhp.js +60 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushPython.js +30 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushRuby.js +28 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushSql.js +42 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushVb.js +29 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushXml.js +70 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shCore.js +414 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shCore.uncompressed.js +674 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/ShowColumns.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/SmartTabs.html +88 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css +158 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Styles/TestPages.css +63 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Templates/Test.dwt +80 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/VB.html +115 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/XML.html +136 -0
- data/app_generators/codex/templates/html/all.html +0 -0
- data/app_generators/codex/templates/readme.txt +4 -0
- data/app_generators/codex/templates/slides/basics.slides +37 -0
- data/app_generators/codex/templates/slides/building.slides +27 -0
- data/app_generators/codex/templates/slides/example.slides +80 -0
- data/app_generators/codex/templates/slides/including_code.slides +80 -0
- data/app_generators/codex/templates/slides/metadata.yml +4 -0
- data/app_generators/codex/templates/slides/table_of_contents.slides +14 -0
- data/app_generators/codex/templates/ui/default/blank.gif +0 -0
- data/app_generators/codex/templates/ui/default/bodybg.gif +0 -0
- data/app_generators/codex/templates/ui/default/framing.css +23 -0
- data/app_generators/codex/templates/ui/default/iepngfix.htc +42 -0
- data/app_generators/codex/templates/ui/default/opera.css +7 -0
- data/app_generators/codex/templates/ui/default/outline.css +15 -0
- data/app_generators/codex/templates/ui/default/pretty.css +86 -0
- data/app_generators/codex/templates/ui/default/print.css +1 -0
- data/app_generators/codex/templates/ui/default/s5-core.css +9 -0
- data/app_generators/codex/templates/ui/default/slides.css +3 -0
- data/app_generators/codex/templates/ui/default/slides.js +553 -0
- data/bin/codex +17 -0
- data/codex.gemspec +30 -0
- data/config/hoe.rb +75 -0
- data/config/requirements.rb +15 -0
- data/lib/codex.rb +7 -0
- data/lib/codex/content.rb +160 -0
- data/lib/codex/pressie.rb +108 -0
- data/lib/codex/version.rb +9 -0
- data/lib/stylesheets/pressie.css +196 -0
- data/lib/stylesheets/print.css +149 -0
- data/lib/stylesheets/ruby.png +0 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/setup.rb +1585 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/website.rake +9 -0
- data/test/test_codex.rb +11 -0
- data/test/test_codex_generator.rb +78 -0
- data/test/test_generator_helper.rb +29 -0
- data/test/test_helper.rb +2 -0
- metadata +163 -0
@@ -0,0 +1,131 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->Ruby<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<pre name="code" class="ruby">
|
51
|
+
# {tagname} {tagfile} {tagaddress}[;" {tagfield}..]
|
52
|
+
# "A tagfield has a name, a colon, and a value: "name:value".
|
53
|
+
# The name of the "kind:" field can be omitted. A program reading the
|
54
|
+
# tags file can recognize the "kind:" field by the missing ':'.
|
55
|
+
|
56
|
+
class Parser
|
57
|
+
@@parsers = []
|
58
|
+
|
59
|
+
def get_type()
|
60
|
+
return ""
|
61
|
+
end
|
62
|
+
|
63
|
+
def parse( xml )
|
64
|
+
@var = nil
|
65
|
+
return nil
|
66
|
+
end
|
67
|
+
|
68
|
+
def Parser.add_parser( :symlink )
|
69
|
+
@@parsers.push( p )
|
70
|
+
end
|
71
|
+
def Parser.parsers()
|
72
|
+
return @@parsers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
class RSSParser < Parser
|
77
|
+
def get_type()
|
78
|
+
return "RSS"
|
79
|
+
end
|
80
|
+
|
81
|
+
def parse( xml )
|
82
|
+
# Parse the XML up and return some known format
|
83
|
+
return nil
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
Parser.add_parser( RSSParser )
|
88
|
+
|
89
|
+
class RDFParser < Parser
|
90
|
+
def get_type()
|
91
|
+
return "RDF"
|
92
|
+
end
|
93
|
+
|
94
|
+
def parse( xml )
|
95
|
+
# Parse the XML up and return some known format
|
96
|
+
return nil
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
Parser.add_parser( RDFParser )
|
101
|
+
</pre>
|
102
|
+
<!-- InstanceEndEditable -->
|
103
|
+
<hr/>
|
104
|
+
Text body after.
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<div class="footer">
|
109
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
113
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
114
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
115
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
116
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
117
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
118
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
119
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
120
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
121
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
122
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
123
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
124
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
125
|
+
<script class="javascript">
|
126
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
127
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
128
|
+
</script>
|
129
|
+
|
130
|
+
</body>
|
131
|
+
<!-- InstanceEnd --></html>
|
@@ -0,0 +1,98 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->SQL<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<pre name="code" class="sql">
|
51
|
+
SELECT TOP 10
|
52
|
+
FirstName,
|
53
|
+
LastName,
|
54
|
+
Email,
|
55
|
+
--SUBSTRING(Phone, 2, 3) AS CityCode,
|
56
|
+
SUBSTRING(Phone, 7, 8) AS PhoneNumber,
|
57
|
+
upper(LanguagePref) AS Language,
|
58
|
+
Address1,
|
59
|
+
UpdatedOn AS CreatedOn
|
60
|
+
FROM
|
61
|
+
profiles
|
62
|
+
WHERE
|
63
|
+
-- Exclude all test emails
|
64
|
+
Email NOT LIKE '%test%'
|
65
|
+
AND Email NOT LIKE '%asdf%'
|
66
|
+
ORDER BY
|
67
|
+
UpdatedOn DESC
|
68
|
+
</pre>
|
69
|
+
<!-- InstanceEndEditable -->
|
70
|
+
<hr/>
|
71
|
+
Text body after.
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div class="footer">
|
76
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
80
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
81
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
82
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
83
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
84
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
85
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
86
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
87
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
88
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
89
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
90
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
91
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
92
|
+
<script class="javascript">
|
93
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
94
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
95
|
+
</script>
|
96
|
+
|
97
|
+
</body>
|
98
|
+
<!-- InstanceEnd --></html>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
dp.sh.Brushes.CSharp = function()
|
2
|
+
{
|
3
|
+
var keywords = 'abstract as base bool break byte case catch char checked class const ' +
|
4
|
+
'continue decimal default delegate do double else enum event explicit ' +
|
5
|
+
'extern false finally fixed float for foreach get goto if implicit in int ' +
|
6
|
+
'interface internal is lock long namespace new null object operator out ' +
|
7
|
+
'override params private protected public readonly ref return sbyte sealed set ' +
|
8
|
+
'short sizeof stackalloc static string struct switch this throw true try ' +
|
9
|
+
'typeof uint ulong unchecked unsafe ushort using virtual void while';
|
10
|
+
|
11
|
+
this.regexList = [
|
12
|
+
// There's a slight problem with matching single line comments and figuring out
|
13
|
+
// a difference between // and ///. Using lookahead and lookbehind solves the
|
14
|
+
// problem, unfortunately JavaScript doesn't support lookbehind. So I'm at a
|
15
|
+
// loss how to translate that regular expression to JavaScript compatible one.
|
16
|
+
// { regex: new RegExp('(?<!/)//(?!/).*$|(?<!/)////(?!/).*$|/\\*[^\\*]*(.)*?\\*/', 'gm'), css: 'comment' }, // one line comments starting with anything BUT '///' and multiline comments
|
17
|
+
// { regex: new RegExp('(?<!/)///(?!/).*$', 'gm'), css: 'comments' }, // XML comments starting with ///
|
18
|
+
|
19
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
20
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
21
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
|
22
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
23
|
+
{ regex: new RegExp('^\\s*#.*', 'gm'), css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
24
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // c# keyword
|
25
|
+
];
|
26
|
+
|
27
|
+
this.CssClass = 'dp-c';
|
28
|
+
this.Style = '.dp-c .vars { color: #d00; }';
|
29
|
+
}
|
30
|
+
|
31
|
+
dp.sh.Brushes.CSharp.prototype = new dp.sh.Highlighter();
|
32
|
+
dp.sh.Brushes.CSharp.Aliases = ['c#', 'c-sharp', 'csharp'];
|
@@ -0,0 +1,73 @@
|
|
1
|
+
/**
|
2
|
+
* Code Syntax Highlighter for C++(Windows Platform).
|
3
|
+
* Version 0.0.2
|
4
|
+
* Copyright (C) 2006 Shin, YoungJin.
|
5
|
+
* http://www.jiniya.net/lecture/techbox/test.html
|
6
|
+
*
|
7
|
+
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
|
8
|
+
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
|
9
|
+
* any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
12
|
+
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
13
|
+
* details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
|
16
|
+
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
|
+
*/
|
18
|
+
|
19
|
+
dp.sh.Brushes.Cpp = function()
|
20
|
+
{
|
21
|
+
var datatypes =
|
22
|
+
'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
|
23
|
+
'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
|
24
|
+
'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
|
25
|
+
'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
|
26
|
+
'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
|
27
|
+
'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
|
28
|
+
'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
|
29
|
+
'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
|
30
|
+
'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
|
31
|
+
'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
|
32
|
+
'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
|
33
|
+
'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
|
34
|
+
'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
|
35
|
+
'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
|
36
|
+
'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
|
37
|
+
'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
|
38
|
+
'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
|
39
|
+
'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
|
40
|
+
'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
|
41
|
+
'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
|
42
|
+
'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
|
43
|
+
'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
|
44
|
+
'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
|
45
|
+
'va_list wchar_t wctrans_t wctype_t wint_t signed';
|
46
|
+
|
47
|
+
var keywords =
|
48
|
+
'break case catch class const __finally __exception __try ' +
|
49
|
+
'const_cast continue private public protected __declspec ' +
|
50
|
+
'default delete deprecated dllexport dllimport do dynamic_cast ' +
|
51
|
+
'else enum explicit extern if for friend goto inline ' +
|
52
|
+
'mutable naked namespace new noinline noreturn nothrow ' +
|
53
|
+
'register reinterpret_cast return selectany ' +
|
54
|
+
'sizeof static static_cast struct switch template this ' +
|
55
|
+
'thread throw true false try typedef typeid typename union ' +
|
56
|
+
'using uuid virtual void volatile whcar_t while';
|
57
|
+
|
58
|
+
this.regexList = [
|
59
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
60
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
61
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
|
62
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
63
|
+
{ regex: new RegExp('^ *#.*', 'gm'), css: 'preprocessor' },
|
64
|
+
{ regex: new RegExp(this.GetKeywords(datatypes), 'gm'), css: 'datatypes' },
|
65
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' }
|
66
|
+
];
|
67
|
+
|
68
|
+
this.CssClass = 'dp-cpp';
|
69
|
+
this.Style = '.dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }';
|
70
|
+
}
|
71
|
+
|
72
|
+
dp.sh.Brushes.Cpp.prototype = new dp.sh.Highlighter();
|
73
|
+
dp.sh.Brushes.Cpp.Aliases = ['cpp', 'c', 'c++'];
|
@@ -0,0 +1,52 @@
|
|
1
|
+
dp.sh.Brushes.CSS = function()
|
2
|
+
{
|
3
|
+
var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
|
4
|
+
'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
|
5
|
+
'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
|
6
|
+
'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
|
7
|
+
'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
|
8
|
+
'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
|
9
|
+
'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
|
10
|
+
'height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
|
11
|
+
'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
|
12
|
+
'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
|
13
|
+
'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
|
14
|
+
'quotes richness right size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
|
15
|
+
'table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
|
16
|
+
'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index important';
|
17
|
+
|
18
|
+
var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
|
19
|
+
'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
|
20
|
+
'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
|
21
|
+
'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
|
22
|
+
'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
|
23
|
+
'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
|
24
|
+
'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
|
25
|
+
'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
|
26
|
+
'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
|
27
|
+
'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
|
28
|
+
'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
|
29
|
+
'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
|
30
|
+
'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
|
31
|
+
'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
|
32
|
+
|
33
|
+
var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif';
|
34
|
+
|
35
|
+
this.regexList = [
|
36
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
37
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // double quoted strings
|
38
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // single quoted strings
|
39
|
+
{ regex: new RegExp('\\#[a-zA-Z0-9]{3,6}', 'g'), css: 'colors' }, // html colors
|
40
|
+
{ regex: new RegExp('(\\d+)(px|pt|\:)', 'g'), css: 'string' }, // size specifications
|
41
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
42
|
+
{ regex: new RegExp(this.GetKeywords(values), 'g'), css: 'string' }, // values
|
43
|
+
{ regex: new RegExp(this.GetKeywords(fonts), 'g'), css: 'string' } // fonts
|
44
|
+
];
|
45
|
+
|
46
|
+
this.CssClass = 'dp-css';
|
47
|
+
this.Style = '.dp-css .colors { color: darkred; }' +
|
48
|
+
'.dp-css .vars { color: #d00; }';
|
49
|
+
}
|
50
|
+
|
51
|
+
dp.sh.Brushes.CSS.prototype = new dp.sh.Highlighter();
|
52
|
+
dp.sh.Brushes.CSS.Aliases = ['css'];
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/* Delphi brush is contributed by Eddie Shipman */
|
2
|
+
dp.sh.Brushes.Delphi = function()
|
3
|
+
{
|
4
|
+
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
|
5
|
+
'case char class comp const constructor currency destructor div do double ' +
|
6
|
+
'downto else end except exports extended false file finalization finally ' +
|
7
|
+
'for function goto if implementation in inherited int64 initialization ' +
|
8
|
+
'integer interface is label library longint longword mod nil not object ' +
|
9
|
+
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
|
10
|
+
'pint64 pointer private procedure program property pshortstring pstring ' +
|
11
|
+
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
|
12
|
+
'record repeat set shl shortint shortstring shr single smallint string then ' +
|
13
|
+
'threadvar to true try type unit until uses val var varirnt while widechar ' +
|
14
|
+
'widestring with word write writeln xor';
|
15
|
+
|
16
|
+
this.regexList = [
|
17
|
+
{ regex: new RegExp('\\(\\*[\\s\\S]*?\\*\\)', 'gm'), css: 'comment' }, // multiline comments (* *)
|
18
|
+
{ regex: new RegExp('{(?!\\$)[\\s\\S]*?}', 'gm'), css: 'comment' }, // multiline comments { }
|
19
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line
|
20
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
|
21
|
+
{ regex: new RegExp('\\{\\$[a-zA-Z]+ .+\\}', 'g'), css: 'directive' }, // Compiler Directives and Region tags
|
22
|
+
{ regex: new RegExp('\\b[\\d\\.]+\\b', 'g'), css: 'number' }, // numbers 12345
|
23
|
+
{ regex: new RegExp('\\$[a-zA-Z0-9]+\\b', 'g'), css: 'number' }, // numbers $F5D3
|
24
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
25
|
+
];
|
26
|
+
|
27
|
+
this.CssClass = 'dp-delphi';
|
28
|
+
this.Style = '.dp-delphi .number { color: blue; }' +
|
29
|
+
'.dp-delphi .directive { color: #008284; }' +
|
30
|
+
'.dp-delphi .vars { color: #000; }';
|
31
|
+
}
|
32
|
+
|
33
|
+
dp.sh.Brushes.Delphi.prototype = new dp.sh.Highlighter();
|
34
|
+
dp.sh.Brushes.Delphi.Aliases = ['delphi', 'pascal'];
|
@@ -0,0 +1,22 @@
|
|
1
|
+
dp.sh.Brushes.JScript = function()
|
2
|
+
{
|
3
|
+
var keywords = 'abstract boolean break byte case catch char class const continue debugger ' +
|
4
|
+
'default delete do double else enum export extends false final finally float ' +
|
5
|
+
'for function goto if implements import in instanceof int interface long native ' +
|
6
|
+
'new null package private protected public return short static super switch ' +
|
7
|
+
'synchronized this throw throws transient true try typeof var void volatile while with';
|
8
|
+
|
9
|
+
this.regexList = [
|
10
|
+
{ regex: dp.sh.RegexLib.SingleLineCComments, css: 'comment' }, // one line comments
|
11
|
+
{ regex: dp.sh.RegexLib.MultiLineCComments, css: 'comment' }, // multiline comments
|
12
|
+
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // double quoted strings
|
13
|
+
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // single quoted strings
|
14
|
+
{ regex: new RegExp('^\\s*#.*', 'gm'), css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
15
|
+
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keywords
|
16
|
+
];
|
17
|
+
|
18
|
+
this.CssClass = 'dp-c';
|
19
|
+
}
|
20
|
+
|
21
|
+
dp.sh.Brushes.JScript.prototype = new dp.sh.Highlighter();
|
22
|
+
dp.sh.Brushes.JScript.Aliases = ['js', 'jscript', 'javascript'];
|