/* Magpie syntax contributed by Bob Nystrom */
dp.sh.Brushes.Magpie = function()
{
  var keywords =	'break case def do else ' +
					'end fn for if let match mutable namespace return ' +
					'struct then union using var while';

  var builtins =	'true false'

	this.regexList = [
		{ regex: dp.sh.RegexLib.MultiLineCComments,			css: 'comment' },	// one line comments
		{ regex: dp.sh.RegexLib.SingleLineCComments,			css: 'comment' },	// one line comments
		{ regex: dp.sh.RegexLib.DoubleQuotedString,				css: 'string' },	// double quoted strings
		{ regex: new RegExp(this.GetKeywords(keywords), 'gm'),	css: 'keyword' },	// keywords
		{ regex: new RegExp('&lt;-', 'g'),	css: 'keyword' },	  // <-
		{ regex: new RegExp('-&gt;', 'g'),	css: 'keyword' },	  // ->
		{ regex: new RegExp('\'', 'g'),	css: 'keyword' },	      // '
		{ regex: new RegExp('\\.', 'g'),	css: 'keyword' },
		{ regex: new RegExp(':', 'g'),	css: 'keyword' },
		{ regex: new RegExp(',', 'g'),	css: 'keyword' },
		{ regex: new RegExp('[0-9]+', 'g'),	css: 'literal' }, // int literals
		{ regex: new RegExp(this.GetKeywords(builtins), 'gm'),	css: 'literal' }
		];

//	this.CssClass = 'dp-rb';
//	this.Style =	'.dp-rb .symbol { color: #a70; }' +
//					'.dp-rb .variable { color: #a70; font-weight: bold; }';
}

dp.sh.Brushes.Magpie.prototype = new dp.sh.Highlighter();
dp.sh.Brushes.Magpie.Aliases = ['magpie', 'mag'];
