// brush: “javascript” aliases: [“js”, “actionscript”]

// This file is part of the “jQuery.Syntax” project, and is distributed under the MIT License. // Copyright © 2019 Samuel G. D. Williams. <www.oriontransfer.co.nz> // See <jquery.syntax.js> for licensing details.

Syntax.register('javascript', function(brush) {

var keywords = ["async", "await", "break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "export", "extends", "finally", "for", "function", "if", "import", "in", "instanceof", "let", "new", "return", "super", "switch", "this", "throw", "try", "typeof", "var", "void", "while", "with", "yield"];

var operators = ["+", "*", "/", "-", "&", "|", "~", "!", "%", "<", "=", ">"];
var values = ["this", "true", "false", "null"];

var access = ["implements", "package", "protected", "interface", "private", "public"];

brush.push(values, {klass: 'constant'});
brush.push(keywords, {klass: 'keyword'});
brush.push(operators, {klass: 'operator'});
brush.push(access, {klass: 'access'});

// Regular expressions
brush.push(Syntax.lib.perlStyleRegularExpression);

// Camel Case Types
brush.push(Syntax.lib.camelCaseType);

// Comments
brush.push(Syntax.lib.cStyleComment);
brush.push(Syntax.lib.cppStyleComment);
brush.push(Syntax.lib.webLink);

// Strings
brush.push(Syntax.lib.singleQuotedString);
brush.push(Syntax.lib.doubleQuotedString);
brush.push(Syntax.lib.stringEscape);

// Numbers
brush.push(Syntax.lib.decimalNumber);
brush.push(Syntax.lib.hexNumber);

// Functions
brush.push(Syntax.lib.cStyleFunction);

});