/*
 * JsMin
 * Javascript Compressor
 * http://www.crockford.com/
 * http://www.smallsharptools.com/
*/

// Elijah Manor
// Version 1.0
// 11/12/2008
// elijah.manor@gmail.com

// Version 2.0
// Eric F. Vincent
// eric@efvincent.com
// fixed up for more recent version of SyntaxHilighter

SyntaxHighlighter.brushes.FSharp = function () {
    var keywords = 'abstract and as assert asr begin class default delegate do done downcast downto else end ' +
                    'enum exception false finally for fun function if in inherit interface land lazy let lor lsl ' +
                    'lsr lxor match member mod module mutable namespace new null of open or override rec sig static ' +
                    'struct then to true try type val when inline upcast while with async atomic break checked ' +
                    'component const constraint constructor continue decimal eager event external fixed functor ' + 
                    'include method mixin object process property protected public pure readonly return sealed switch ' +
                    'virtual void volatile';

    function fixComments(match, regexInfo) {
        var css = (match[0].indexOf("///") == 0)
			? 'color1'
			: 'comments'
			;

        return [new SyntaxHighlighter.Match(match[0], match.index, css)];
    }

    this.regexList =
        [
            { regex: SyntaxHighlighter.regexLib.singleLineCComments,    func: fixComments },
            { regex: new RegExp('\\(\\*[\\s\\S]*\\*\\)', 'gm'),         css: 'comment' },
            { regex: SyntaxHighlighter.regexLib.doubleQuotedString,     css: 'string' },
            //{ regex: SyntaxHighlighter.regexLib.singleQuotedString,     css: 'string' },
            { regex: new RegExp('^\\s*#.*', 'gm'),                      css: 'preprocessor' },
            { regex: new RegExp(this.getKeywords(keywords), 'gm'),      css: 'keyword' },
            { regex: new RegExp('(\\s+-&gt;\\s+)', 'gm'),               css: 'keyword' }
        ];
    this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
    this.CssClass = 'dp-c'; 
    this.Style = '.dp-c .vars { color: #d00; }';
}
SyntaxHighlighter.brushes.FSharp.prototype  = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.FSharp.aliases    = ['f#', 'f-sharp', 'fsharp', 'FSharp'];

