prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
26 lines (25 loc) • 845 B
JavaScript
import { a as languages } from "../../core-8vQkh0Rd.js";
//#region src/prism/languages/awk.js
languages.gawk = languages.awk = {
"hashbang": {
pattern: /^#!.*/g,
alias: "comment"
},
"comment": /#.*/g,
"string": {
pattern: /(^|[^\\])"(?:\\.|[^\\\n"])*"/g,
lookbehind: true
},
"regex": {
pattern: /((?:^|[^\w\s)])\s*)\/(?:\\.|[^\\\n/])*\//g,
lookbehind: true
},
"variable": /\$\w+/,
"keyword": /\b(?:BEGIN|BEGINFILE|END|ENDFILE|break|case|continue|default|delete|do|else|exit|for|function|getline|if|in|next|nextfile|printf?|return|switch|while)\b|@(?:include|load)\b/,
"function": /\b[a-z_]\w*(?=\s*\()/i,
"number": /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[a-fA-F\d]+)\b/,
"operator": /--|\+\+|!?~|>&|>>|<<|(?:\*\*|[%^!=<>/*+-])=?|&&|\|[|&]|[?:]/,
"punctuation": /[()[\]{},;]/
};
//#endregion
//# sourceMappingURL=awk.js.map