UNPKG

sam-editor

Version:
1,891 lines (1,715 loc) 13.5 MB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("vue")); else if(typeof define === 'function' && define.amd) define(["vue"], factory); else if(typeof exports === 'object') exports["SamEditor"] = factory(require("vue")); else root["SamEditor"] = factory(root["Vue"]); })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "fb15"); /******/ }) /************************************************************************/ /******/ ({ /***/ "0033": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_outline_normal_vue_vue_type_style_index_0_id_29349b8e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b4ef"); /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_outline_normal_vue_vue_type_style_index_0_id_29349b8e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_outline_normal_vue_vue_type_style_index_0_id_29349b8e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /***/ }), /***/ "0068": /***/ (function(module, exports, __webpack_require__) { "use strict"; // Utilities // function _class(obj) { return Object.prototype.toString.call(obj); } function isString(obj) { return _class(obj) === '[object String]'; } var _hasOwnProperty = Object.prototype.hasOwnProperty; function has(object, key) { return _hasOwnProperty.call(object, key); } // Merge objects // function assign(obj /*from1, from2, from3, ...*/) { var sources = Array.prototype.slice.call(arguments, 1); sources.forEach(function (source) { if (!source) { return; } if (typeof source !== 'object') { throw new TypeError(source + 'must be object'); } Object.keys(source).forEach(function (key) { obj[key] = source[key]; }); }); return obj; } // Remove element from array and put another array at those position. // Useful for some operations with tokens function arrayReplaceAt(src, pos, newElements) { return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); } //////////////////////////////////////////////////////////////////////////////// function isValidEntityCode(c) { /*eslint no-bitwise:0*/ // broken sequence if (c >= 0xD800 && c <= 0xDFFF) { return false; } // never used if (c >= 0xFDD0 && c <= 0xFDEF) { return false; } if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; } // control codes if (c >= 0x00 && c <= 0x08) { return false; } if (c === 0x0B) { return false; } if (c >= 0x0E && c <= 0x1F) { return false; } if (c >= 0x7F && c <= 0x9F) { return false; } // out of range if (c > 0x10FFFF) { return false; } return true; } function fromCodePoint(c) { /*eslint no-bitwise:0*/ if (c > 0xffff) { c -= 0x10000; var surrogate1 = 0xd800 + (c >> 10), surrogate2 = 0xdc00 + (c & 0x3ff); return String.fromCharCode(surrogate1, surrogate2); } return String.fromCharCode(c); } var UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g; var ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi; var UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi'); var DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i; var entities = __webpack_require__("bd68"); function replaceEntityPattern(match, name) { var code = 0; if (has(entities, name)) { return entities[name]; } if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) { code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10); if (isValidEntityCode(code)) { return fromCodePoint(code); } } return match; } /*function replaceEntities(str) { if (str.indexOf('&') < 0) { return str; } return str.replace(ENTITY_RE, replaceEntityPattern); }*/ function unescapeMd(str) { if (str.indexOf('\\') < 0) { return str; } return str.replace(UNESCAPE_MD_RE, '$1'); } function unescapeAll(str) { if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { return str; } return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) { if (escaped) { return escaped; } return replaceEntityPattern(match, entity); }); } //////////////////////////////////////////////////////////////////////////////// var HTML_ESCAPE_TEST_RE = /[&<>"]/; var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g; var HTML_REPLACEMENTS = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }; function replaceUnsafeChar(ch) { return HTML_REPLACEMENTS[ch]; } function escapeHtml(str) { if (HTML_ESCAPE_TEST_RE.test(str)) { return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar); } return str; } //////////////////////////////////////////////////////////////////////////////// var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g; function escapeRE(str) { return str.replace(REGEXP_ESCAPE_RE, '\\$&'); } //////////////////////////////////////////////////////////////////////////////// function isSpace(code) { switch (code) { case 0x09: case 0x20: return true; } return false; } // Zs (unicode class) || [\t\f\v\r\n] function isWhiteSpace(code) { if (code >= 0x2000 && code <= 0x200A) { return true; } switch (code) { case 0x09: // \t case 0x0A: // \n case 0x0B: // \v case 0x0C: // \f case 0x0D: // \r case 0x20: case 0xA0: case 0x1680: case 0x202F: case 0x205F: case 0x3000: return true; } return false; } //////////////////////////////////////////////////////////////////////////////// /*eslint-disable max-len*/ var UNICODE_PUNCT_RE = __webpack_require__("7ca0"); // Currently without astral characters support. function isPunctChar(ch) { return UNICODE_PUNCT_RE.test(ch); } // Markdown ASCII punctuation characters. // // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~ // http://spec.commonmark.org/0.15/#ascii-punctuation-character // // Don't confuse with unicode punctuation !!! It lacks some chars in ascii range. // function isMdAsciiPunct(ch) { switch (ch) { case 0x21/* ! */: case 0x22/* " */: case 0x23/* # */: case 0x24/* $ */: case 0x25/* % */: case 0x26/* & */: case 0x27/* ' */: case 0x28/* ( */: case 0x29/* ) */: case 0x2A/* * */: case 0x2B/* + */: case 0x2C/* , */: case 0x2D/* - */: case 0x2E/* . */: case 0x2F/* / */: case 0x3A/* : */: case 0x3B/* ; */: case 0x3C/* < */: case 0x3D/* = */: case 0x3E/* > */: case 0x3F/* ? */: case 0x40/* @ */: case 0x5B/* [ */: case 0x5C/* \ */: case 0x5D/* ] */: case 0x5E/* ^ */: case 0x5F/* _ */: case 0x60/* ` */: case 0x7B/* { */: case 0x7C/* | */: case 0x7D/* } */: case 0x7E/* ~ */: return true; default: return false; } } // Hepler to unify [reference labels]. // function normalizeReference(str) { // use .toUpperCase() instead of .toLowerCase() // here to avoid a conflict with Object.prototype // members (most notably, `__proto__`) return str.trim().replace(/\s+/g, ' ').toUpperCase(); } //////////////////////////////////////////////////////////////////////////////// // Re-export libraries commonly used in both markdown-it and its plugins, // so plugins won't have to depend on them explicitly, which reduces their // bundled size (e.g. a browser build). // exports.lib = {}; exports.lib.mdurl = __webpack_require__("d8a6"); exports.lib.ucmicro = __webpack_require__("d5d1"); exports.assign = assign; exports.isString = isString; exports.has = has; exports.unescapeMd = unescapeMd; exports.unescapeAll = unescapeAll; exports.isValidEntityCode = isValidEntityCode; exports.fromCodePoint = fromCodePoint; // exports.replaceEntities = replaceEntities; exports.escapeHtml = escapeHtml; exports.arrayReplaceAt = arrayReplaceAt; exports.isSpace = isSpace; exports.isWhiteSpace = isWhiteSpace; exports.isMdAsciiPunct = isMdAsciiPunct; exports.isPunctChar = isPunctChar; exports.escapeRE = escapeRE; exports.normalizeReference = normalizeReference; /***/ }), /***/ "0081": /***/ (function(module, exports) { /* Language: STEP Part 21 Contributors: Adam Joseph Cook <adam.joseph.cook@gmail.com> Description: Syntax highlighter for STEP Part 21 files (ISO 10303-21). Website: https://en.wikipedia.org/wiki/ISO_10303-21 Category: syntax */ function step21(hljs) { const STEP21_IDENT_RE = '[A-Z_][A-Z0-9_.]*'; const STEP21_KEYWORDS = { $pattern: STEP21_IDENT_RE, keyword: [ "HEADER", "ENDSEC", "DATA" ] }; const STEP21_START = { className: 'meta', begin: 'ISO-10303-21;', relevance: 10 }; const STEP21_CLOSE = { className: 'meta', begin: 'END-ISO-10303-21;', relevance: 10 }; return { name: 'STEP Part 21', aliases: [ 'p21', 'step', 'stp' ], case_insensitive: true, // STEP 21 is case insensitive in theory, in practice all non-comments are capitalized. keywords: STEP21_KEYWORDS, contains: [ STEP21_START, STEP21_CLOSE, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, hljs.COMMENT('/\\*\\*!', '\\*/'), hljs.C_NUMBER_MODE, hljs.inherit(hljs.APOS_STRING_MODE, { illegal: null }), hljs.inherit(hljs.QUOTE_STRING_MODE, { illegal: null }), { className: 'string', begin: "'", end: "'" }, { className: 'symbol', variants: [ { begin: '#', end: '\\d+', illegal: '\\W' } ] } ] }; } module.exports = step21; /***/ }), /***/ "00bd": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function emoji_html(tokens, idx /*, options, env */) { return tokens[idx].content; }; /***/ }), /***/ "00ee": /***/ (function(module, exports, __webpack_require__) { "use strict"; var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ "00fc": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_b304a032_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6e309d66_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f24a"); /* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_b304a032_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6e309d66_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_b304a032_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6e309d66_scoped_true__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_b304a032_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6e309d66_scoped_true__WEBPACK_IMPORTED_MODULE_0__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_b304a032_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6e309d66_scoped_true__WEBPACK_IMPORTED_MODULE_0__["render"]; }); /* harmony reexport (checked) */ if(__webpack_require__.o(_node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_b304a032_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6e309d66_scoped_true__WEBPACK_IMPORTED_MODULE_0__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_b304a032_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6e309d66_scoped_true__WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; }); /***/ }), /***/ "00fd": /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__("9e69"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /***/ "0108": /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__("4ea4").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _samEditor = _interopRequireDefault(__webpack_require__("efb6")); __webpack_require__("ace0"); _samEditor.default.install = function (Vue) { Vue.component(_samEditor.default.name, _samEditor.default); }; var _default = exports.default = _samEditor.default; /***/ }), /***/ "0118": /***/ (function(module, exports) { /* Language: Node REPL Requires: javascript.js Author: Marat Nagayev <nagaevmt@yandex.ru> Category: scripting */ /** @type LanguageFn */ function nodeRepl(hljs) { return { name: 'Node REPL', contains: [ { className: 'meta.prompt', starts: { // a space separates the REPL prefix from the actual code // this is purely for cleaner HTML output end: / |$/, starts: { end: '$', subLanguage: 'javascript' } }, variants: [ { begin: /^>(?=[ ]|$)/ }, { begin: /^\.\.\.(?=[ ]|$)/ } ] } ] }; } module.exports = nodeRepl; /***/ }), /***/ "01ac": /***/ (function(module, exports) { /* Language: Ada Author: Lars Schulna <kartoffelbrei.mit.muskatnuss@gmail.org> Description: Ada is a general-purpose programming language that has great support for saftey critical and real-time applications. It has been developed by the DoD and thus has been used in military and safety-critical applications (like civil aviation). The first version appeared in the 80s, but it's still actively developed today with the newest standard being Ada2012. */ // We try to support full Ada2012 // // We highlight all appearances of types, keywords, literals (string, char, number, bool) // and titles (user defined function/procedure/package) // CSS classes are set accordingly // // Languages causing problems for language detection: // xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword) // sql (ada default.txt has a lot of sql keywords) /** @type LanguageFn */ function ada(hljs) { // Regular expression for Ada numeric literals. // stolen form the VHDL highlighter // Decimal literal: const INTEGER_RE = '\\d(_|\\d)*'; const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE; const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?'; // Based literal: const BASED_INTEGER_RE = '\\w+'; const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?'; const NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')'; // Identifier regex const ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*'; // bad chars, only allowed in literals const BAD_CHARS = `[]\\{\\}%#'"`; // Ada doesn't have block comments, only line comments const COMMENTS = hljs.COMMENT('--', '$'); // variable declarations of the form // Foo : Bar := Baz; // where only Bar will be highlighted const VAR_DECLS = { // TODO: These spaces are not required by the Ada syntax // however, I have yet to see handwritten Ada code where // someone does not put spaces around : begin: '\\s+:\\s+', end: '\\s*(:=|;|\\)|=>|$)', // endsWithParent: true, // returnBegin: true, illegal: BAD_CHARS, contains: [ { // workaround to avoid highlighting // named loops and declare blocks beginKeywords: 'loop for declare others', endsParent: true }, { // properly highlight all modifiers className: 'keyword', beginKeywords: 'not null constant access function procedure in out aliased exception' }, { className: 'type', begin: ID_REGEX, endsParent: true, relevance: 0 } ] }; const KEYWORDS = [ "abort", "else", "new", "return", "abs", "elsif", "not", "reverse", "abstract", "end", "accept", "entry", "select", "access", "exception", "of", "separate", "aliased", "exit", "or", "some", "all", "others", "subtype", "and", "for", "out", "synchronized", "array", "function", "overriding", "at", "tagged", "generic", "package", "task", "begin", "goto", "pragma", "terminate", "body", "private", "then", "if", "procedure", "type", "case", "in", "protected", "constant", "interface", "is", "raise", "use", "declare", "range", "delay", "limited", "record", "when", "delta", "loop", "rem", "while", "digits", "renames", "with", "do", "mod", "requeue", "xor" ]; return { name: 'Ada', case_insensitive: true, keywords: { keyword: KEYWORDS, literal: [ "True", "False" ] }, contains: [ COMMENTS, // strings "foobar" { className: 'string', begin: /"/, end: /"/, contains: [ { begin: /""/, relevance: 0 } ] }, // characters '' { // character literals always contain one char className: 'string', begin: /'.'/ }, { // number literals className: 'number', begin: NUMBER_RE, relevance: 0 }, { // Attributes className: 'symbol', begin: "'" + ID_REGEX }, { // package definition, maybe inside generic className: 'title', begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?', end: '(is|$)', keywords: 'package body', excludeBegin: true, excludeEnd: true, illegal: BAD_CHARS }, { // function/procedure declaration/definition // maybe inside generic begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+', end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)', keywords: 'overriding function procedure with is renames return', // we need to re-match the 'function' keyword, so that // the title mode below matches only exactly once returnBegin: true, contains: [ COMMENTS, { // name of the function/procedure className: 'title', begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+', end: '(\\(|\\s+|$)', excludeBegin: true, excludeEnd: true, illegal: BAD_CHARS }, // 'self' // // parameter types VAR_DECLS, { // return type className: 'type', begin: '\\breturn\\s+', end: '(\\s+|;|$)', keywords: 'return', excludeBegin: true, excludeEnd: true, // we are done with functions endsParent: true, illegal: BAD_CHARS } ] }, { // new type declarations // maybe inside generic className: 'type', begin: '\\b(sub)?type\\s+', end: '\\s+', keywords: 'type', excludeBegin: true, illegal: BAD_CHARS }, // see comment above the definition VAR_DECLS // no markup // relevance boosters for small snippets // {begin: '\\s*=>\\s*'}, // {begin: '\\s*:=\\s*'}, // {begin: '\\s+:=\\s+'}, ] }; } module.exports = ada; /***/ }), /***/ "0209": /***/ (function(module, exports) { /* Language: C++ Category: common, system Website: https://isocpp.org */ /** @type LanguageFn */ function cpp(hljs) { const regex = hljs.regex; // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does // not include such support nor can we be sure all the grammars depending // on it would desire this behavior const C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', { contains: [ { begin: /\\\n/ } ] }); const DECLTYPE_AUTO_RE = 'decltype\\(auto\\)'; const NAMESPACE_RE = '[a-zA-Z_]\\w*::'; const TEMPLATE_ARGUMENT_RE = '<[^<>]+>'; const FUNCTION_TYPE_RE = '(?!struct)(' + DECLTYPE_AUTO_RE + '|' + regex.optional(NAMESPACE_RE) + '[a-zA-Z_]\\w*' + regex.optional(TEMPLATE_ARGUMENT_RE) + ')'; const CPP_PRIMITIVE_TYPES = { className: 'type', begin: '\\b[a-z\\d_]*_t\\b' }; // https://en.cppreference.com/w/cpp/language/escape // \\ \x \xFF \u2837 \u00323747 \374 const CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)'; const STRINGS = { className: 'string', variants: [ { begin: '(u8?|U|L)?"', end: '"', illegal: '\\n', contains: [ hljs.BACKSLASH_ESCAPE ] }, { begin: '(u8?|U|L)?\'(' + CHARACTER_ESCAPES + '|.)', end: '\'', illegal: '.' }, hljs.END_SAME_AS_BEGIN({ begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/, end: /\)([^()\\ ]{0,16})"/ }) ] }; const NUMBERS = { className: 'number', variants: [ // Floating-point literal. { begin: "[+-]?(?:" // Leading sign. // Decimal. + "(?:" +"[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?" + "|\\.[0-9](?:'?[0-9])*" + ")(?:[Ee][+-]?[0-9](?:'?[0-9])*)?" + "|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*" // Hexadecimal. + "|0[Xx](?:" +"[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?" + "|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*" + ")[Pp][+-]?[0-9](?:'?[0-9])*" + ")(?:" // Literal suffixes. + "[Ff](?:16|32|64|128)?" + "|(BF|bf)16" + "|[Ll]" + "|" // Literal suffix is optional. + ")" }, // Integer literal. { begin: "[+-]?\\b(?:" // Leading sign. + "0[Bb][01](?:'?[01])*" // Binary. + "|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*" // Hexadecimal. + "|0(?:'?[0-7])*" // Octal or just a lone zero. + "|[1-9](?:'?[0-9])*" // Decimal. + ")(?:" // Literal suffixes. + "[Uu](?:LL?|ll?)" + "|[Uu][Zz]?" + "|(?:LL?|ll?)[Uu]?" + "|[Zz][Uu]" + "|" // Literal suffix is optional. + ")" // Note: there are user-defined literal suffixes too, but perhaps having the custom suffix not part of the // literal highlight actually makes it stand out more. } ], relevance: 0 }; const PREPROCESSOR = { className: 'meta', begin: /#\s*[a-z]+\b/, end: /$/, keywords: { keyword: 'if else elif endif define undef warning error line ' + 'pragma _Pragma ifdef ifndef include' }, contains: [ { begin: /\\\n/, relevance: 0 }, hljs.inherit(STRINGS, { className: 'string' }), { className: 'string', begin: /<.*?>/ }, C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE ] }; const TITLE_MODE = { className: 'title', begin: regex.optional(NAMESPACE_RE) + hljs.IDENT_RE, relevance: 0 }; const FUNCTION_TITLE = regex.optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\('; // https://en.cppreference.com/w/cpp/keyword const RESERVED_KEYWORDS = [ 'alignas', 'alignof', 'and', 'and_eq', 'asm', 'atomic_cancel', 'atomic_commit', 'atomic_noexcept', 'auto', 'bitand', 'bitor', 'break', 'case', 'catch', 'class', 'co_await', 'co_return', 'co_yield', 'compl', 'concept', 'const_cast|10', 'consteval', 'constexpr', 'constinit', 'continue', 'decltype', 'default', 'delete', 'do', 'dynamic_cast|10', 'else', 'enum', 'explicit', 'export', 'extern', 'false', 'final', 'for', 'friend', 'goto', 'if', 'import', 'inline', 'module', 'mutable', 'namespace', 'new', 'noexcept', 'not', 'not_eq', 'nullptr', 'operator', 'or', 'or_eq', 'override', 'private', 'protected', 'public', 'reflexpr', 'register', 'reinterpret_cast|10', 'requires', 'return', 'sizeof', 'static_assert', 'static_cast|10', 'struct', 'switch', 'synchronized', 'template', 'this', 'thread_local', 'throw', 'transaction_safe', 'transaction_safe_dynamic', 'true', 'try', 'typedef', 'typeid', 'typename', 'union', 'using', 'virtual', 'volatile', 'while', 'xor', 'xor_eq' ]; // https://en.cppreference.com/w/cpp/keyword const RESERVED_TYPES = [ 'bool', 'char', 'char16_t', 'char32_t', 'char8_t', 'double', 'float', 'int', 'long', 'short', 'void', 'wchar_t', 'unsigned', 'signed', 'const', 'static' ]; const TYPE_HINTS = [ 'any', 'auto_ptr', 'barrier', 'binary_semaphore', 'bitset', 'complex', 'condition_variable', 'condition_variable_any', 'counting_semaphore', 'deque', 'false_type', 'future', 'imaginary', 'initializer_list', 'istringstream', 'jthread', 'latch', 'lock_guard', 'multimap', 'multiset', 'mutex', 'optional', 'ostringstream', 'packaged_task', 'pair', 'promise', 'priority_queue', 'queue', 'recursive_mutex', 'recursive_timed_mutex', 'scoped_lock', 'set', 'shared_future', 'shared_lock', 'shared_mutex', 'shared_timed_mutex', 'shared_ptr', 'stack', 'string_view', 'stringstream', 'timed_mutex', 'thread', 'true_type', 'tuple', 'unique_lock', 'unique_ptr', 'unordered_map', 'unordered_multimap', 'unordered_multiset', 'unordered_set', 'variant', 'vector', 'weak_ptr', 'wstring', 'wstring_view' ]; const FUNCTION_HINTS = [ 'abort', 'abs', 'acos', 'apply', 'as_const', 'asin', 'atan', 'atan2', 'calloc', 'ceil', 'cerr', 'cin', 'clog', 'cos', 'cosh', 'cout', 'declval', 'endl', 'exchange', 'exit', 'exp', 'fabs', 'floor', 'fmod', 'forward', 'fprintf', 'fputs', 'free', 'frexp', 'fscanf', 'future', 'invoke', 'isalnum', 'isalpha', 'iscntrl', 'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace', 'isupper', 'isxdigit', 'labs', 'launder', 'ldexp', 'log', 'log10', 'make_pair', 'make_shared', 'make_shared_for_overwrite', 'make_tuple', 'make_unique', 'malloc', 'memchr', 'memcmp', 'memcpy', 'memset', 'modf', 'move', 'pow', 'printf', 'putchar', 'puts', 'realloc', 'scanf', 'sin', 'sinh', 'snprintf', 'sprintf', 'sqrt', 'sscanf', 'std', 'stderr', 'stdin', 'stdout', 'strcat', 'strchr', 'strcmp', 'strcpy', 'strcspn', 'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr', 'strspn', 'strstr', 'swap', 'tan', 'tanh', 'terminate', 'to_underlying', 'tolower', 'toupper', 'vfprintf', 'visit', 'vprintf', 'vsprintf' ]; const LITERALS = [ 'NULL', 'false', 'nullopt', 'nullptr', 'true' ]; // https://en.cppreference.com/w/cpp/keyword const BUILT_IN = [ '_Pragma' ]; const CPP_KEYWORDS = { type: RESERVED_TYPES, keyword: RESERVED_KEYWORDS, literal: LITERALS, built_in: BUILT_IN, _type_hints: TYPE_HINTS }; const FUNCTION_DISPATCH = { className: 'function.dispatch', relevance: 0, keywords: { // Only for relevance, not highlighting. _hint: FUNCTION_HINTS }, begin: regex.concat( /\b/, /(?!decltype)/, /(?!if)/, /(?!for)/, /(?!switch)/, /(?!while)/, hljs.IDENT_RE, regex.lookahead(/(<[^<>]+>|)\s*\(/)) }; const EXPRESSION_CONTAINS = [ FUNCTION_DISPATCH, PREPROCESSOR, CPP_PRIMITIVE_TYPES, C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, NUMBERS, STRINGS ]; const EXPRESSION_CONTEXT = { // This mode covers expression context where we can't expect a function // definition and shouldn't highlight anything that looks like one: // `return some()`, `else if()`, `(x*sum(1, 2))` variants: [ { begin: /=/, end: /;/ }, { begin: /\(/, end: /\)/ }, { beginKeywords: 'new throw return else', end: /;/ } ], keywords: CPP_KEYWORDS, contains: EXPRESSION_CONTAINS.concat([ { begin: /\(/, end: /\)/, keywords: CPP_KEYWORDS, contains: EXPRESSION_CONTAINS.concat([ 'self' ]), relevance: 0 } ]), relevance: 0 }; const FUNCTION_DECLARATION = { className: 'function', begin: '(' + FUNCTION_TYPE_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE, returnBegin: true, end: /[{;=]/, excludeEnd: true, keywords: CPP_KEYWORDS, illegal: /[^\w\s\*&:<>.]/, contains: [ { // to prevent it from being confused as the function title begin: DECLTYPE_AUTO_RE, keywords: CPP_KEYWORDS, relevance: 0 }, { begin: FUNCTION_TITLE, returnBegin: true, contains: [ TITLE_MODE ], relevance: 0 }, // needed because we do not have look-behind on the below rule // to prevent it from grabbing the final : in a :: pair { begin: /::/, relevance: 0 }, // initializers { begin: /:/, endsWithParent: true, contains: [ STRINGS, NUMBERS ] }, // allow for multiple declarations, e.g.: // extern void f(int), g(char); { relevance: 0, match: /,/ }, { className: 'params', begin: /\(/, end: /\)/, keywords: CPP_KEYWORDS, relevance: 0, contains: [ C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, STRINGS, NUMBERS, CPP_PRIMITIVE_TYPES, // Count matching parentheses. { begin: /\(/, end: /\)/, keywords: CPP_KEYWORDS, relevance: 0, contains: [ 'self', C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, STRINGS, NUMBERS, CPP_PRIMITIVE_TYPES ] } ] }, CPP_PRIMITIVE_TYPES, C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, PREPROCESSOR ] }; return { name: 'C++', aliases: [ 'cc', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx' ], keywords: CPP_KEYWORDS, illegal: '</', classNameAliases: { 'function.dispatch': 'built_in' }, contains: [].concat( EXPRESSION_CONTEXT, FUNCTION_DECLARATION, FUNCTION_DISPATCH, EXPRESSION_CONTAINS, [ PREPROCESSOR, { // containers: ie, `vector <int> rooms (9);` begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)', end: '>', keywords: CPP_KEYWORDS, contains: [ 'self', CPP_PRIMITIVE_TYPES ] }, { begin: hljs.IDENT_RE + '::', keywords: CPP_KEYWORDS }, { match: [ // extra complexity to deal with `enum class` and `enum struct` /\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/, /\s+/, /\w+/ ], className: { 1: 'keyword', 3: 'title.class' } } ]) }; } module.exports = cpp; /***/ }), /***/ "0215": /***/ (function(module, exports) { /** * @param {string} value * @returns {RegExp} * */ function escape(value) { return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm'); } /** * @param {RegExp | string } re * @returns {string} */ function source(re) { if (!re) return null; if (typeof re === "string") return re; return re.source; } /** * @param {RegExp | string } re * @returns {string} */ function lookahead(re) { return concat('(?=', re, ')'); } /** * @param {...(RegExp | string) } args * @returns {string} */ function concat(...args) { const joined = args.map((x) => source(x)).join(""); return joined; } /** * @param { Array<string | RegExp | Object> } args * @returns {object} */ function stripOptionsFromArgs(args) { const opts = args[args.length - 1]; if (typeof opts === 'object' && opts.constructor === Object) { args.splice(args.length - 1, 1); return opts; } else { return {}; } } /** @typedef { {capture?: boolean} } RegexEitherOptions */ /** * Any of the passed expresssions may match * * Creates a huge this | this | that | that match * @param {(RegExp | string)[] | [...(RegExp | string)[], RegexEitherOptions]} args * @returns {string} */ function either(...args) { /** @type { object & {capture?: boolean} } */ const opts = stripOptionsFromArgs(args); const joined = '(' + (opts.capture ? "" : "?:") + args.map((x) => source(x)).join("|") + ")"; return joined; } /* Language: F# Author: Jonas Follesø <jonas@follesoe.no> Contributors: Troy Kershaw <hello@troykershaw.com>, Henrik Feldt <henrik@haf.se>, Melvyn Laïly <melvyn.laily@gmail.com> Website: https://docs.microsoft.com/en-us/dotnet/fsharp/ Category: functional */ /** @type LanguageFn */ function fsharp(hljs) { const KEYWORDS = [ "abstract", "and", "as", "assert", "base", "begin", "class", "default", "delegate", "do", "done", "downcast", "downto", "elif", "else", "end", "exception", "extern", // "false", // literal "finally", "fixed", "for", "fun", "function", "global", "if", "in", "inherit", "inline", "interface", "internal", "lazy", "let", "match", "member", "module", "mutable", "namespace", "new", // "not", // built_in // "null", // literal "of", "open", "or", "override", "private", "public", "rec", "return", "static", "struct", "then", "to", // "true", // literal "try", "type", "upcast", "use", "val", "void", "when", "while", "with", "yield" ]; const BANG_KEYWORD_MODE = { // monad builder keywords (matches before non-bang keywords) scope: 'keyword', match: /\b(yield|return|let|do|match|use)!/ }; const PREPROCESSOR_KEYWORDS = [ "if", "else", "endif", "line", "nowarn", "light", "r", "i", "I", "load", "time", "help", "quit" ]; const LITERALS = [ "true", "false", "null", "Some", "None", "Ok", "Error", "infinity", "infinityf", "nan", "nanf" ]; const SPECIAL_IDENTIFIERS = [ "__LINE__", "__SOURCE_DIRECTORY__", "__SOURCE_FILE__" ]; // Since it's possible to re-bind/shadow names (e.g. let char = 'c'), // these builtin types should only be matched when a type name is expected. const KNOWN_TYPES = [ // basic types "bool", "byte", "sbyte", "int8", "int16", "int32", "uint8", "uint16", "uint32", "int", "uint", "int64", "uint64", "nativeint", "unativeint", "decimal", "float", "double", "float32", "single", "char", "string", "unit", "bigint", // other native types or lowercase aliases "option", "voption", "list", "array", "seq", "byref", "exn", "inref", "nativeptr", "obj", "outref", "voidptr", // other important FSharp types "Result" ]; const BUILTINS = [ // Somewhat arbitrary list of builtin functions and values. // Most of them are declared in Microsoft.FSharp.Core // I tried to stay relevant by adding only the most idiomatic // and most used symbols that are not already declared as types. "not", "ref", "raise", "reraise", "dict", "readOnlyDict", "set", "get", "enum", "sizeof", "typeof", "typedefof", "nameof", "nullArg", "invalidArg", "invalidOp", "id", "fst", "snd", "ignore", "lock", "using", "box", "unbox", "tryUnbox", "printf", "printfn", "sprintf", "eprintf", "eprintfn", "fprintf", "fprintfn", "failwith", "failwithf" ]; const ALL_KEYWORDS = { keyword: KEYWORDS, literal: LITERALS, built_in: BUILTINS, 'variable.constant': SPECIAL_IDENTIFIERS }; // (* potentially multi-line Meta Language style comment *) const ML_COMMENT = hljs.COMMENT(/\(\*(?!\))/, /\*\)/, { contains: ["self"] }); // Either a multi-line (* Meta Language style comment *) or a single line // C style comment. const COMMENT = { variants: [ ML_COMMENT, hljs.C_LINE_COMMENT_MODE, ] }; // Most identifiers can contain apostrophes const IDENTIFIER_RE = /[a-zA-Z_](\w|')*/; const QUOTED_IDENTIFIER = { scope: 'variable', begin: /``/, end: /``/ }; // 'a or ^a where a can be a ``quoted identifier`` const BEGIN_GENERIC_TYPE_SYMBOL_RE = /\B('|\^)/; const GENERIC_TYPE_SYMBOL = { scope: 'symbol', variants: [ // the type name is a quoted identifier: { match: concat(BEGIN_GENERIC_TYPE_SYMBOL_RE, /``.*?``/) }, // the type name is a normal identifier (we don't use IDENTIFIER_RE because there cannot be another apostrophe here): { match: concat(BEGIN_GENERIC_TYPE_SYMBOL_RE, hljs.UNDERSCORE_IDENT_RE) } ], relevance: 0 }; const makeOperatorMode = function({ includeEqual }) { // List or symbolic operator characters from the FSharp Spec 4.1, minus the dot, and with `?` added, used for nullable operators. let allOperatorChars; if (includeEqual) allOperatorChars = "!%&*+-/<=>@^|~?"; else allOperatorChars = "!%&*+-/<>@^|~?"; const OPERATOR_CHARS = Array.from(allOperatorChars); const OPERATOR_CHAR_RE = concat('[', ...OPERATOR_CHARS.map(escape), ']'); // The lone dot operator is special. It cannot be redefined, and we don't want to highlight it. It can be used as part of a multi-chars operator though. const OPERATOR_CHAR_OR_DOT_RE = either(OPERATOR_CHAR_RE, /\./); // When a dot is present, it must be followed by another operator char: const OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE = concat(OPERATOR_CHAR_OR_DOT_RE, lookahead(OPERATOR_CHAR_OR_DOT_RE)); const SYMBOLIC_OPERATOR_RE = either( concat(OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE, OPERATOR_CHAR_OR_DOT_RE, '*'), // Matches at least 2 chars operators concat(OPERATOR_CHAR_RE, '+'), // Matches at least one char operators ); return { scope: 'operator', match: either( // symbolic operators: SYMBOLIC_OPERATOR_RE, // other symbolic keywords: // Type casting and conversion operators: /:\?>/, /:\?/, /:>/, /:=/, // Reference cell assignment /::?/, // : or :: /\$/), // A single $ can be used as an operator relevance: 0 }; }; const OPERATOR = makeOperatorMode({ includeEqual: true }); // This variant is used when matching '=' should end a parent mode: const OPERATOR_WITHOUT_EQUAL = makeOperatorMode({ includeEqual: false }); const makeTypeAnnotationMode = function(prefix, prefixScope) { return { begin: concat( // a type annotation is a prefix, // should be a colon or the 'of' keyword lookahead( // that has to be followed by concat( /\s*/, // optional space either( // then either of: /\w/, // word /'/, // generic type name /\^/, // generic type name /#/, // flexible type name /``/, // quoted type name /\(/, // parens type expression /{\|/, // anonymous type annotation )))), beginScope: prefixScope, // BUG: because ending with \n is necessary for some cases, multi-line type annotations are not properly supported. // Examples where \n is required at the end: // - abstract member definitions in classes: abstract Property : int * string // - return type annotations: let f f' = f' () : returnTypeAnnotation // - record fields definitions: { A : int \n B : string } end: lookahead( either( /\n/, /=/)), relevance: 0, // we need the known types, and we need the type constraint keywords