]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/go.js
1 /*! `go` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= ( function () {
8 Author: Stephan Kountso aka StepLg <steplg@gmail.com>
9 Contributors: Evgeny Stepanischev <imbolk@gmail.com>
10 Description: Google go language (golang). For info about language
11 Website: http://golang.org/
12 Category: common, system
96 aliases : [ 'golang' ],
100 hljs
. C_LINE_COMMENT_MODE
,
101 hljs
. C_BLOCK_COMMENT_MODE
,
105 hljs
. QUOTE_STRING_MODE
,
106 hljs
. APOS_STRING_MODE
,
117 match : /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/ , // hex without a present digit before . (making a digit afterwards required)
121 match : /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/ , // hex with a present digit before . (making a digit afterwards optional)
125 match : /-?\b0[oO](_?[0-7])*i?/ , // leading 0o octal
129 match : /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/ , // decimal without a present digit before . (making a digit afterwards required)
133 match : /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/ , // decimal with a present digit before . (making a digit afterwards optional)
138 { begin : /:=/ // relevance booster
141 className : 'function' ,
142 beginKeywords : 'func' ,
165 hljs
. registerLanguage ( 'go' , hljsGrammar
);