/* Gherkin syntax created by Ben Mabey*/
dp.sh.Brushes.Gherkin = function()
{
  var line_keywords =  'Given When Then And But';
  var description_keywords = 'Feature Story Scenario Outline';

 
  this.regexList = [
    { regex: dp.sh.RegexLib.SingleLinePerlComments,     css: 'comment' }, // one line comments
    { regex: dp.sh.RegexLib.DoubleQuotedString,       css: 'string' },  // double quoted strings
   // { regex: dp.sh.RegexLib.SingleQuotedString,       css: 'string' },  // single quoted strings
    //{ regex: new RegExp(':[a-z][A-Za-z0-9_]*', 'g'),    css: 'symbol' },  // symbols
    //{ regex: new RegExp('(\\$|@@|@)\\w+', 'g'),       css: 'variable' },  // $global, @instance, and @@class variables
    { regex: new RegExp(this.GetKeywords(line_keywords), 'gm'),  css: 'keyword' },
    //{ regex: new RegExp(this.GetKeywords(description_keywords), 'gm'),  css: 'description_keyword' },
    // Argg.. why can't I apply different css to different captures?
    { regex: new RegExp('^\\s*(Feature|Scenario|Scenario Outline|Story):(.+)', 'gm'), css: 'description' },
    ];
 
  this.CssClass = 'dp-gh';
  this.Style = '.dp-gh .description_keyword { color: #a70; font-weight: bold; text-decoration:underline;}' +
                '.dp-gh .description { color: #a70; font-weight: bold; text-decoration:underline;}';
}
 
dp.sh.Brushes.Gherkin.prototype = new dp.sh.Highlighter();
dp.sh.Brushes.Gherkin.Aliases = ['cucumber', 'feature'];
