on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
45 lines (44 loc) • 1.18 kB
JavaScript
/*! on-codemerge v1.3.1 @author Pavel Kuzmin @license MIT @homepage https://s00d.github.io/on-codemerge/ @repository git+https://github.com/s00d/on-codemerge.git Copyright (c) 2026 Pavel Kuzmin - Built on 2026-07-02T13:39:17.947Z */
import { TokenType as t } from "../../../types.mjs";
const n = {
name: "go",
patterns: {
[t.Comment]: /^\/\/.*$|^\/\*[\s\S]*?\*\//,
[t.String]: /^(?:"(?:\\.|[^"\\])*"|`[^`]*`)/,
[t.Number]: /^\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?i?\b/,
[t.Function]: /^\b[a-zA-Z_]\w*(?=\s*\()/,
[t.Type]: /^\b(?:string|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float32|float64|complex64|complex128|byte|rune|bool|error|interface)\b/,
[t.Operator]: /^(?:->|:=|\+\+|--|\|\||&&|[+\-*/%&|^<>!=]=?)/,
[t.Punctuation]: /^[{}[\]();,.]/
},
keywords: [
"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"
]
};
export {
n as goDefinition
};