prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
25 lines (24 loc) • 894 B
JavaScript
import { a as languages } from "../../core-8vQkh0Rd.js";
import { t as boolean } from "../../patterns-C0vJBvXO.js";
//#region src/prism/languages/rip.js
languages.rip = {
"comment": /#.*/g,
"char": /\B`[^\s"'`#/\\<>()[\]{}.,:;]\b/g,
"string": /(["'])(?:\\.|(?!\1)[^\\\n])*\1/g,
"regex": {
pattern: /(^|[^/])\/(?!\/)(?:\[[^\n\]]*\]|\\.|[^\\\n/[])+\/(?=\s*(?:$|[\n.,;})]))/g,
lookbehind: true
},
"keyword": /(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,
"builtin": /@|\bSystem\b/,
"boolean": boolean,
"date": /\b\d{4}-\d\d-\d\d\b/,
"time": /\b\d\d:\d\d:\d\d\b/,
"datetime": /\b\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\b/,
"symbol": /:(?!\d)[^\s"'`#/\\<>()[\]{}.,:;]+/,
"number": /[+-]?\b(?:\d+\.\d+|\d+)\b/,
"punctuation": /\.{2,3}|[`\\<>=/()[\]{}.,:;]/,
"reference": /(?!\d)[^\s"'`#/\\<>()[\]{}.,:;]+/
};
//#endregion
//# sourceMappingURL=rip.js.map