summaryrefslogtreecommitdiffstats
path: root/autocomplete/js/shBrushJScript.js
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-03-27 22:59:06 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-03-27 22:59:06 +0100
commitaf0be8f9546fb5dec947be33e465bb6d9e85d0a7 (patch)
tree46fa7f026d861e54753e78ac8265563b0ddfca36 /autocomplete/js/shBrushJScript.js
parent2b589908f4624b0ee41217f21d5b0b7cb383d38c (diff)
issue111, first try of auto completion for tag search box
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'autocomplete/js/shBrushJScript.js')
-rw-r--r--autocomplete/js/shBrushJScript.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/autocomplete/js/shBrushJScript.js b/autocomplete/js/shBrushJScript.js
new file mode 100644
index 0000000..e61a767
--- /dev/null
+++ b/autocomplete/js/shBrushJScript.js
@@ -0,0 +1,22 @@
+dp.sh.Brushes.JScript = function()
+{
+ var keywords = 'abstract boolean break byte case catch char class const continue debugger ' +
+ 'default delete do double else enum export extends false final finally float ' +
+ 'for function goto if implements import in instanceof int interface long native ' +
+ 'new null package private protected public return short static super switch ' +
+ 'synchronized this throw throws transient true try typeof var void volatile while with';
+
+ this.regexList = [
+ { regex: new RegExp('//.*$', 'gm'), css: 'comment' }, // one line comments
+ { regex: new RegExp('/\\*[\\s\\S]*?\\*/', 'g'), css: 'comment' }, // multiline comments
+ { regex: new RegExp('"(?:\\.|[^\\""])*"', 'g'), css: 'string' }, // double quoted strings
+ { regex: new RegExp('\'(?:\\.|[^\\\'\'])*\'', 'g'), css: 'string' }, // single quoted strings
+ { regex: new RegExp('^\\s*#.*', 'gm'), css: 'preprocessor' }, // preprocessor tags like #region and #endregion
+ { regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keywords
+ ];
+
+ this.CssClass = 'dp-c';
+}
+
+dp.sh.Brushes.JScript.prototype = new dp.sh.Highlighter();
+dp.sh.Brushes.JScript.Aliases = ['js', 'jscript', 'javascript'];