1
// brush: "go" aliases: []
3
// This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
4
// Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
5
// See <jquery.syntax.js> for licensing details.
7
Syntax.register('go', function(brush) {
8
var keywords = ["break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct", "chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "type", "continue", "for", "import", "return", "var"];
19
var operators = ["+", "&", "+=", "&=", "&&", "==", "!=", "-", "|", "-=", "|=", "||", "<", "<=", "*", "^", "*=", "^=", "<-", ">", ">=", "/", "<<", "/=", "<<=", "++", "=", ":=", ",", ";", "%", ">>", "%=", ">>=", "--", "!", "...", ".", ":", "&^", "&^="];
21
var values = ["true", "false", "iota", "nil"];
23
var functions = ["append", "cap", "close", "complex", "copy", "imag", "len", "make", "new", "panic", "print", "println", "real", "recover"];
25
brush.push(values, {klass: 'constant'});
26
brush.push(types, {klass: 'type'});
27
brush.push(keywords, {klass: 'keyword'});
28
brush.push(operators, {klass: 'operator'});
29
brush.push(functions, {klass: 'function'});
31
brush.push(Syntax.lib.cStyleFunction);
33
brush.push(Syntax.lib.camelCaseType);
35
brush.push(Syntax.lib.cStyleComment);
36
brush.push(Syntax.lib.cppStyleComment);
37
brush.push(Syntax.lib.webLink);
40
brush.push(Syntax.lib.singleQuotedString);
41
brush.push(Syntax.lib.doubleQuotedString);
42
brush.push(Syntax.lib.stringEscape);
45
brush.push(Syntax.lib.decimalNumber);
46
brush.push(Syntax.lib.hexNumber);