Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node tools/build.js -t browser
14 changes: 9 additions & 5 deletions src/languages/csharp.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default function(hljs) {
'descending',
'dynamic',
'equals',
'field',
'file',
'from',
'get',
Expand Down Expand Up @@ -152,7 +153,13 @@ export default function(hljs) {
'when',
'where',
'with',
'yield'
'yield',
'__arglist',
'__makeref',
'__reftype',
'__refvalue',
'module',
'assembly'
];

const KEYWORDS = {
Expand Down Expand Up @@ -266,10 +273,7 @@ export default function(hljs) {

return {
name: 'C#',
aliases: [
'cs',
'c#'
],
aliases: ['cs', 'c#'],
keywords: KEYWORDS,
illegal: /::/,
contains: [
Expand Down
153 changes: 153 additions & 0 deletions src/languages/gold.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
/*
Language: Gold
Author: Carlo Kok <ck@remobjects.com>
Contributor: Stephan Kountso aka StepLg <steplg@gmail.com>, Evgeny Stepanischev <imbolk@gmail.com>
Description: Gold is RemObjects Software's Go-compatible language for the Elements compiler.
Website: https://www.elementscompiler.com/elements/gold/
*/

export default function(hljs) {
const LITERALS = [
"true",
"false",
"iota",
"nil"
];
const BUILT_INS = [
"append",
"cap",
"close",
"complex",
"copy",
"imag",
"len",
"make",
"new",
"panic",
"print",
"println",
"real",
"recover",
"delete"
];
const TYPES = [
"bool",
"byte",
"complex64",
"complex128",
"error",
"float32",
"float64",
"int8",
"int16",
"int32",
"int64",
"string",
"uint8",
"uint16",
"uint32",
"uint64",
"int",
"uint",
"uintptr",
"rune"
];
const KWS = [
"break",
"case",
"chan",
"const",
"continue",
"default",
"defer",
"else",
"fallthrough",
"for",
"func",
"go",
"goto",
"if",
"import",
"interface",
"map",
"package",
"range",
"return",
"select",
"struct",
"switch",
"type",
"var",
];
const KEYWORDS = {
keyword: KWS,
type: TYPES,
literal: LITERALS,
built_in: BUILT_INS
};
return {
name: 'Gold',
aliases: ['gold'],
keywords: KEYWORDS,
illegal: '</',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'string',
variants: [
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
{
begin: '`',
end: '`'
}
]
},
{
className: 'number',
variants: [
{
match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,
relevance: 0
},
{
match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
relevance: 0
},
{
match: /-?\b0[oO](_?[0-7])*i?/,
relevance: 0
},
{
match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
relevance: 0
},
{
match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
relevance: 0
}
]
},
{ begin: /:=/
},
{
className: 'function',
beginKeywords: 'func',
end: '\\s*(\\{|$)',
excludeEnd: true,
contains: [
hljs.TITLE_MODE,
{
className: 'params',
begin: /\(/,
end: /\)/,
endsParent: true,
keywords: KEYWORDS,
illegal: /["']/
}
]
}
]
};
}
Loading