UNPKG

@tanstack/highlight

Version:

Tiny class-based syntax highlighting for documentation.

14 lines (13 loc) • 913 B
// Vocabulary adapted from Highlight.js 11.11.1, see NOTICE.md. import { simpleLanguage, cComments } from '../internal/simple-language.js'; export const groovy = /* @__PURE__ */ simpleLanguage({ name: "groovy", aliases: [], numberSuffix: '[gGlLiIfFdD]?', comments: cComments, strings: /'''[\s\S]*?(?:'''|(?![\s\S]))|"""[\s\S]*?(?:"""|(?![\s\S]))|"(?:\\[\s\S]|[^"\\])*(?:"|(?![\s\S]))|\'(?:\\[^\r\n]|[^\'\\\r\n])*(?:\'|(?![\s\S]))/, keywords: "def as in assert trait abstract static volatile transient public private protected synchronized final class interface enum if else for while switch case break default continue throw throws try catch finally implements extends new import package return instanceof var", literals: "true false null", types: "byte short char int long boolean float double void", rules: [{ className: 'function', regex: /\b[A-Za-z_]\w*(?=\s*\()/g }], });