UNPKG

prism-code-editor

Version:

Lightweight, extensible code editor component for the web using Prism

58 lines (57 loc) 1.56 kB
import { l as languages } from "../../index-DF54SWhA.js"; import { a as clikeComment } from "../../patterns-Jkz_nwNQ.js"; languages.g4 = languages.antlr4 = { "comment": clikeComment, "string": /'(?:\\.|[^\\\n'])*'/g, "character-class": { pattern: /\[(?:\\.|[^\\\]\n])*\]/g, alias: "regex", inside: { "range": { pattern: /([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/, lookbehind: true, alias: "punctuation" }, "escape": /\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\nupP])/, "punctuation": /[[\]]/ } }, "action": { pattern: /\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})*\})*\}/g, inside: { "content": /(?!^)[^]+(?=.)/, "punctuation": /./ } }, "command": { pattern: /(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\n]*\))?)+(?=\s*;)/i, lookbehind: true, inside: { "function": /\b\w+(?!\s*[^\s,(])/, "punctuation": /[(),]/ } }, "annotation": { pattern: /@\w+(?:::\w+)*/, alias: "keyword" }, "label": { pattern: /#[ ]*\w+/, alias: "punctuation" }, "keyword": /\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/, "definition": [ { pattern: /\b[a-z]\w*(?=\s*:)/, alias: "rule class-name" }, { pattern: /\b[A-Z]\w*(?=\s*:)/, alias: "token constant" } ], "constant": /\b[A-Z][A-Z_]*\b/, "operator": /\.\.|->|[|~]|[*+?]\??/, "punctuation": /[():;=]/ }; //# sourceMappingURL=antlr4.js.map