UNPKG

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

44 lines (43 loc) 942 B
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 };