Socket
Socket
Sign inDemoInstall

highlight.js

Package Overview
Dependencies
0
Maintainers
5
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.3.2 to 10.4.0-beta0

lib/languages/node-repl.js

5

lib/index.js

@@ -12,4 +12,2 @@ var hljs = require('./core');

hljs.registerLanguage('arcade', require('./languages/arcade'));
hljs.registerLanguage('c-like', require('./languages/c-like'));
hljs.registerLanguage('cpp', require('./languages/cpp'));
hljs.registerLanguage('arduino', require('./languages/arduino'));

@@ -29,2 +27,3 @@ hljs.registerLanguage('armasm', require('./languages/armasm'));

hljs.registerLanguage('brainfuck', require('./languages/brainfuck'));
hljs.registerLanguage('c-like', require('./languages/c-like'));
hljs.registerLanguage('c', require('./languages/c'));

@@ -41,2 +40,3 @@ hljs.registerLanguage('cal', require('./languages/cal'));

hljs.registerLanguage('cos', require('./languages/cos'));
hljs.registerLanguage('cpp', require('./languages/cpp'));
hljs.registerLanguage('crmsh', require('./languages/crmsh'));

@@ -127,2 +127,3 @@ hljs.registerLanguage('crystal', require('./languages/crystal'));

hljs.registerLanguage('nix', require('./languages/nix'));
hljs.registerLanguage('node-repl', require('./languages/node-repl'));
hljs.registerLanguage('nsis', require('./languages/nsis'));

@@ -129,0 +130,0 @@ hljs.registerLanguage('objectivec', require('./languages/objectivec'));

4

lib/languages/actionscript.js

@@ -37,3 +37,3 @@ /*

className: 'class',
beginKeywords: 'package', end: '{',
beginKeywords: 'package', end: /\{/,
contains: [hljs.TITLE_MODE]

@@ -43,3 +43,3 @@ },

className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
beginKeywords: 'class interface', end: /\{/, excludeEnd: true,
contains: [

@@ -46,0 +46,0 @@ {

@@ -40,3 +40,3 @@ /*

// bad chars, only allowed in literals
var BAD_CHARS = `[]{}%#'"`;
var BAD_CHARS = `[]\\{\\}%#'"`;

@@ -43,0 +43,0 @@ // Ada doesn't have block comments, only line comments

@@ -40,3 +40,3 @@ /*

// avoid close detection with C# and JS
illegal: '(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\s*[^\\(])',
illegal: '(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])',

@@ -75,3 +75,3 @@ contains: [

{ // interface or namespace declaration
beginKeywords: 'interface namespace', end: '{',
beginKeywords: 'interface namespace', end: /\{/,
illegal: '[;.\\-]',

@@ -87,3 +87,3 @@ contains: [

{ // class declaration
beginKeywords: 'class', end: '{',
beginKeywords: 'class', end: /\{/,
illegal: '[;.\\-]',

@@ -90,0 +90,0 @@ contains: [

/*
Language: C-like foundation grammar for C/C++ grammars
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>, Roel Deckers <admin@codingcat.nl>, Sam Wu <samsam2310@gmail.com>, Jordi Petit <jordi.petit@gmail.com>, Pieter Vantorre <pietervantorre@gmail.com>, Google Inc. (David Benjamin) <davidben@google.com>
Category: common, system
*/
/* In the future the intention is to split out the C/C++ grammars distinctly
since they are separate languages. They will likely share a common foundation
though, and this file sets the groundwork for that - so that we get the breaking
change in v10 and don't have to change the requirements again later.
See: https://github.com/highlightjs/highlight.js/issues/2146
*/
/** @type LanguageFn */
function cLike(hljs) {
function optional(s) {
return '(?:' + s + ')?';
}
// 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
var C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
contains: [{begin: /\\\n/}]
});
var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';
var NAMESPACE_RE = '[a-zA-Z_]\\w*::';
var TEMPLATE_ARGUMENT_RE = '<.*?>';
var FUNCTION_TYPE_RE = '(' +
DECLTYPE_AUTO_RE + '|' +
optional(NAMESPACE_RE) +'[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
')';
var CPP_PRIMITIVE_TYPES = {
className: 'keyword',
begin: '\\b[a-z\\d_]*_t\\b'
};
// https://en.cppreference.com/w/cpp/language/escape
// \\ \x \xFF \u2837 \u00323747 \374
var CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)';
var 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})"/,
})
]
};
var NUMBERS = {
className: 'number',
variants: [
{ begin: '\\b(0b[01\']+)' },
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
],
relevance: 0
};
var PREPROCESSOR = {
className: 'meta',
begin: /#\s*[a-z]+\b/, end: /$/,
keywords: {
'meta-keyword':
'if else elif endif define undef warning error line ' +
'pragma _Pragma ifdef ifndef include'
},
contains: [
{
begin: /\\\n/, relevance: 0
},
hljs.inherit(STRINGS, {className: 'meta-string'}),
{
className: 'meta-string',
begin: /<.*?>/, end: /$/,
illegal: '\\n',
},
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
var TITLE_MODE = {
className: 'title',
begin: optional(NAMESPACE_RE) + hljs.IDENT_RE,
relevance: 0
};
var FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\(';
var CPP_KEYWORDS = {
keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +
'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
'unsigned long volatile static protected bool template mutable if public friend ' +
'do goto auto void enum else break extern using asm case typeid wchar_t ' +
'short reinterpret_cast|10 default double register explicit signed typename try this ' +
'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +
'concept co_await co_return co_yield requires ' +
'noexcept static_assert thread_local restrict final override ' +
'atomic_bool atomic_char atomic_schar ' +
'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
'atomic_ullong new throw return ' +
'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',
built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +
'auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set ' +
'unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos ' +
'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +
'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +
'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +
'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +
'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +
'vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary',
literal: 'true false nullptr NULL'
};
var EXPRESSION_CONTAINS = [
PREPROCESSOR,
CPP_PRIMITIVE_TYPES,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBERS,
STRINGS
];
var 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
};
var 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
},
{
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 {
aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'],
keywords: CPP_KEYWORDS,
// the base c-like language will NEVER be auto-detected, rather the
// derivitives: c, c++, arduino turn auto-detect back on for themselves
disableAutodetect: true,
illegal: '</',
contains: [].concat(
EXPRESSION_CONTEXT,
FUNCTION_DECLARATION,
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)\\s*<', end: '>',
keywords: CPP_KEYWORDS,
contains: ['self', CPP_PRIMITIVE_TYPES]
},
{
begin: hljs.IDENT_RE + '::',
keywords: CPP_KEYWORDS
},
{
className: 'class',
beginKeywords: 'enum class struct union', end: /[{;:<>=]/,
contains: [
{ beginKeywords: "final class struct" },
hljs.TITLE_MODE
]
}
]),
exports: {
preprocessor: PREPROCESSOR,
strings: STRINGS,
keywords: CPP_KEYWORDS
}
};
}
/*
Language: C++
Category: common, system
Website: https://isocpp.org
*/
/** @type LanguageFn */
function cPlusPlus(hljs) {
const lang = cLike(hljs);
// return auto-detection back on
lang.disableAutodetect = false;
lang.name = 'C++';
lang.aliases = ['cc', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'];
return lang;
}
/*
Language: Arduino
Author: Stefania Mellai <s.mellai@arduino.cc>
Description: The Arduino® Language is a superset of C++. This rules are designed to highlight the Arduino® source code. For info about language see http://www.arduino.cc.
Requires: cpp.js
Website: https://www.arduino.cc

@@ -11,92 +274,91 @@ */

function arduino(hljs) {
var ARDUINO_KW = {
keyword:
'boolean byte word String',
built_in:
'setup loop ' +
'KeyboardController MouseController SoftwareSerial ' +
'EthernetServer EthernetClient LiquidCrystal ' +
'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
'HttpClient RobotMotor WiFiClient GSMScanner ' +
'FileSystem Scheduler GSMServer YunClient YunServer ' +
'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
'Console GSMBand Esplora Stepper Process ' +
'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
'Client Server GSMPIN FileIO Bridge Serial ' +
'EEPROM Stream Mouse Audio Servo File Task ' +
'GPRS WiFi Wire TFT GSM SPI SD ' +
'runShellCommandAsynchronously analogWriteResolution ' +
'retrieveCallingNumber printFirmwareVersion ' +
'analogReadResolution sendDigitalPortPair ' +
'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
'beginTransmission getSignalStrength runAsynchronously ' +
'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
'readAccelerometer messageAvailable sendDigitalPorts ' +
'lineFollowConfig countryNameWrite runShellCommand ' +
'readStringUntil rewindDirectory readTemperature ' +
'setClockDivider readLightSensor endTransmission ' +
'analogReference detachInterrupt countryNameRead ' +
'attachInterrupt encryptionType readBytesUntil ' +
'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
'userNameWrite readJoystickY readJoystickX mouseReleased ' +
'openNextFile scanNetworks noInterrupts digitalWrite ' +
'beginSpeaker mousePressed isActionDone mouseDragged ' +
'displayLogos noAutoscroll addParameter remoteNumber ' +
'getModifiers keyboardRead userNameRead waitContinue ' +
'processInput parseCommand printVersion readNetworks ' +
'writeMessage blinkVersion cityNameRead readMessage ' +
'setDataMode parsePacket isListening setBitOrder ' +
'beginPacket isDirectory motorsWrite drawCompass ' +
'digitalRead clearScreen serialEvent rightToLeft ' +
'setTextSize leftToRight requestFrom keyReleased ' +
'compassRead analogWrite interrupts WiFiServer ' +
'disconnect playMelody parseFloat autoscroll ' +
'getPINUsed setPINUsed setTimeout sendAnalog ' +
'readSlider analogRead beginWrite createChar ' +
'motorsStop keyPressed tempoWrite readButton ' +
'subnetMask debugPrint macAddress writeGreen ' +
'randomSeed attachGPRS readString sendString ' +
'remotePort releaseAll mouseMoved background ' +
'getXChange getYChange answerCall getResult ' +
'voiceCall endPacket constrain getSocket writeJSON ' +
'getButton available connected findUntil readBytes ' +
'exitValue readGreen writeBlue startLoop IPAddress ' +
'isPressed sendSysex pauseMode gatewayIP setCursor ' +
'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
'onRequest onReceive changePIN playFile noBuffer ' +
'parseInt overflow checkPIN knobRead beginTFT ' +
'bitClear updateIR bitWrite position writeRGB ' +
'highByte writeRed setSpeed readBlue noStroke ' +
'remoteIP transfer shutdown hangCall beginSMS ' +
'endWrite attached maintain noCursor checkReg ' +
'checkPUK shiftOut isValid shiftIn pulseIn ' +
'connect println localIP pinMode getIMEI ' +
'display noBlink process getBand running beginSD ' +
'drawBMP lowByte setBand release bitRead prepare ' +
'pointTo readRed setMode noFill remove listen ' +
'stroke detach attach noTone exists buffer ' +
'height bitSet circle config cursor random ' +
'IRread setDNS endSMS getKey micros ' +
'millis begin print write ready flush width ' +
'isPIN blink clear press mkdir rmdir close ' +
'point yield image BSSID click delay ' +
'read text move peek beep rect line open ' +
'seek fill size turn stop home find ' +
'step tone sqrt RSSI SSID ' +
'end bit tan cos sin pow map abs max ' +
'min get run put',
literal:
'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
'DEFAULT OUTPUT INPUT HIGH LOW'
const ARDUINO_KW = {
keyword:
'boolean byte word String',
built_in:
'setup loop ' +
'KeyboardController MouseController SoftwareSerial ' +
'EthernetServer EthernetClient LiquidCrystal ' +
'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
'HttpClient RobotMotor WiFiClient GSMScanner ' +
'FileSystem Scheduler GSMServer YunClient YunServer ' +
'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
'Console GSMBand Esplora Stepper Process ' +
'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
'Client Server GSMPIN FileIO Bridge Serial ' +
'EEPROM Stream Mouse Audio Servo File Task ' +
'GPRS WiFi Wire TFT GSM SPI SD ' +
'runShellCommandAsynchronously analogWriteResolution ' +
'retrieveCallingNumber printFirmwareVersion ' +
'analogReadResolution sendDigitalPortPair ' +
'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
'beginTransmission getSignalStrength runAsynchronously ' +
'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
'readAccelerometer messageAvailable sendDigitalPorts ' +
'lineFollowConfig countryNameWrite runShellCommand ' +
'readStringUntil rewindDirectory readTemperature ' +
'setClockDivider readLightSensor endTransmission ' +
'analogReference detachInterrupt countryNameRead ' +
'attachInterrupt encryptionType readBytesUntil ' +
'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
'userNameWrite readJoystickY readJoystickX mouseReleased ' +
'openNextFile scanNetworks noInterrupts digitalWrite ' +
'beginSpeaker mousePressed isActionDone mouseDragged ' +
'displayLogos noAutoscroll addParameter remoteNumber ' +
'getModifiers keyboardRead userNameRead waitContinue ' +
'processInput parseCommand printVersion readNetworks ' +
'writeMessage blinkVersion cityNameRead readMessage ' +
'setDataMode parsePacket isListening setBitOrder ' +
'beginPacket isDirectory motorsWrite drawCompass ' +
'digitalRead clearScreen serialEvent rightToLeft ' +
'setTextSize leftToRight requestFrom keyReleased ' +
'compassRead analogWrite interrupts WiFiServer ' +
'disconnect playMelody parseFloat autoscroll ' +
'getPINUsed setPINUsed setTimeout sendAnalog ' +
'readSlider analogRead beginWrite createChar ' +
'motorsStop keyPressed tempoWrite readButton ' +
'subnetMask debugPrint macAddress writeGreen ' +
'randomSeed attachGPRS readString sendString ' +
'remotePort releaseAll mouseMoved background ' +
'getXChange getYChange answerCall getResult ' +
'voiceCall endPacket constrain getSocket writeJSON ' +
'getButton available connected findUntil readBytes ' +
'exitValue readGreen writeBlue startLoop IPAddress ' +
'isPressed sendSysex pauseMode gatewayIP setCursor ' +
'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
'onRequest onReceive changePIN playFile noBuffer ' +
'parseInt overflow checkPIN knobRead beginTFT ' +
'bitClear updateIR bitWrite position writeRGB ' +
'highByte writeRed setSpeed readBlue noStroke ' +
'remoteIP transfer shutdown hangCall beginSMS ' +
'endWrite attached maintain noCursor checkReg ' +
'checkPUK shiftOut isValid shiftIn pulseIn ' +
'connect println localIP pinMode getIMEI ' +
'display noBlink process getBand running beginSD ' +
'drawBMP lowByte setBand release bitRead prepare ' +
'pointTo readRed setMode noFill remove listen ' +
'stroke detach attach noTone exists buffer ' +
'height bitSet circle config cursor random ' +
'IRread setDNS endSMS getKey micros ' +
'millis begin print write ready flush width ' +
'isPIN blink clear press mkdir rmdir close ' +
'point yield image BSSID click delay ' +
'read text move peek beep rect line open ' +
'seek fill size turn stop home find ' +
'step tone sqrt RSSI SSID ' +
'end bit tan cos sin pow map abs max ' +
'min get run put',
literal:
'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
'DEFAULT OUTPUT INPUT HIGH LOW'
};
var ARDUINO = hljs.requireLanguage('cpp').rawDefinition();
const ARDUINO = cPlusPlus(hljs);
var kws = ARDUINO.keywords;
const kws = /** @type {Record<string,any>} */ (ARDUINO.keywords);

@@ -109,2 +371,3 @@ kws.keyword += ' ' + ARDUINO_KW.keyword;

ARDUINO.aliases = ['ino'];
ARDUINO.supersetOf = "cpp";

@@ -111,0 +374,0 @@ return ARDUINO;

@@ -99,3 +99,3 @@ /*

className: 'bullet',
begin: '^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+'
begin: '^(\\*+|-+|\\.+|[^\\n]+?::)\\s+'
},

@@ -102,0 +102,0 @@ // admonition

@@ -14,3 +14,3 @@ /*

{begin: /\$[\w\d#@][\w\d_]*/},
{begin: /\$\{(.*?)}/}
{begin: /\$\{(.*?)\}/}
]

@@ -17,0 +17,0 @@ };

@@ -78,3 +78,3 @@ /*

'flush',
'for',
'for',
'forceliterals',

@@ -87,3 +87,3 @@ 'forcenestedloop',

'generateonly',
'group',
'group',
'hint',

@@ -124,3 +124,3 @@ 'if',

'setting',
'static',
'static',
'sum',

@@ -166,3 +166,3 @@ 'super',

className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
beginKeywords: 'class interface', end: /\{/, excludeEnd: true,
illegal: ':',

@@ -169,0 +169,0 @@ contains: [

@@ -16,3 +16,3 @@ /*

keywords: {
$pattern: '[a-zA-Z][a-zA-Z0-9_\$\%\!\#]*',
$pattern: '[a-zA-Z][a-zA-Z0-9_$%!#]*',
keyword:

@@ -39,3 +39,3 @@ 'ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE ' +

className: 'symbol',
begin: '^[0-9]+\ ',
begin: '^[0-9]+ ',
relevance: 10

@@ -52,3 +52,3 @@ },

className: 'number',
begin: '(\&[hH][0-9a-fA-F]{1,4})'
begin: '(&[hH][0-9a-fA-F]{1,4})'
},

@@ -58,3 +58,3 @@ {

className: 'number',
begin: '(\&[oO][0-7]{1,6})'
begin: '(&[oO][0-7]{1,6})'
}

@@ -61,0 +61,0 @@ ]

@@ -11,3 +11,3 @@ /*

className: 'literal',
begin: '[\\+\\-]',
begin: /[+-]/,
relevance: 0

@@ -39,3 +39,3 @@ };

// this mode works as the only relevance counter
begin: /(?:\+\+|\-\-)/,
begin: /(?:\+\+|--)/,
contains: [LITERAL]

@@ -42,0 +42,0 @@ },

/*
Language: C-like foundation grammar for C/C++ grammars
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>, Roel Deckers <admin@codingcat.nl>, Sam Wu <samsam2310@gmail.com>, Jordi Petit <jordi.petit@gmail.com>, Pieter Vantorre <pietervantorre@gmail.com>, Google Inc. (David Benjamin) <davidben@google.com>
Category: common, system
*/
/* In the future the intention is to split out the C/C++ grammars distinctly
since they are separate languages. They will likely share a common foundation
though, and this file sets the groundwork for that - so that we get the breaking
change in v10 and don't have to change the requirements again later.
See: https://github.com/highlightjs/highlight.js/issues/2146
*/
/** @type LanguageFn */
function cLike(hljs) {
function optional(s) {
return '(?:' + s + ')?';
}
// 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
var C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
contains: [{begin: /\\\n/}]
});
var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';
var NAMESPACE_RE = '[a-zA-Z_]\\w*::';
var TEMPLATE_ARGUMENT_RE = '<.*?>';
var FUNCTION_TYPE_RE = '(' +
DECLTYPE_AUTO_RE + '|' +
optional(NAMESPACE_RE) +'[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
')';
var CPP_PRIMITIVE_TYPES = {
className: 'keyword',
begin: '\\b[a-z\\d_]*_t\\b'
};
// https://en.cppreference.com/w/cpp/language/escape
// \\ \x \xFF \u2837 \u00323747 \374
var CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)';
var 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})"/,
})
]
};
var NUMBERS = {
className: 'number',
variants: [
{ begin: '\\b(0b[01\']+)' },
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
],
relevance: 0
};
var PREPROCESSOR = {
className: 'meta',
begin: /#\s*[a-z]+\b/, end: /$/,
keywords: {
'meta-keyword':
'if else elif endif define undef warning error line ' +
'pragma _Pragma ifdef ifndef include'
},
contains: [
{
begin: /\\\n/, relevance: 0
},
hljs.inherit(STRINGS, {className: 'meta-string'}),
{
className: 'meta-string',
begin: /<.*?>/, end: /$/,
illegal: '\\n',
},
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
var TITLE_MODE = {
className: 'title',
begin: optional(NAMESPACE_RE) + hljs.IDENT_RE,
relevance: 0
};
var FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\(';
var CPP_KEYWORDS = {
keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +
'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
'unsigned long volatile static protected bool template mutable if public friend ' +
'do goto auto void enum else break extern using asm case typeid wchar_t ' +
'short reinterpret_cast|10 default double register explicit signed typename try this ' +
'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +
'concept co_await co_return co_yield requires ' +
'noexcept static_assert thread_local restrict final override ' +
'atomic_bool atomic_char atomic_schar ' +
'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
'atomic_ullong new throw return ' +
'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',
built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +
'auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set ' +
'unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos ' +
'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +
'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +
'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +
'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +
'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +
'vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary',
literal: 'true false nullptr NULL'
};
var EXPRESSION_CONTAINS = [
PREPROCESSOR,
CPP_PRIMITIVE_TYPES,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBERS,
STRINGS
];
var 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
};
var 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
},
{
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 {
aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'],
keywords: CPP_KEYWORDS,
// the base c-like language will NEVER be auto-detected, rather the
// derivitives: c, c++, arduino turn auto-detect back on for themselves
disableAutodetect: true,
illegal: '</',
contains: [].concat(
EXPRESSION_CONTEXT,
FUNCTION_DECLARATION,
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)\\s*<', end: '>',
keywords: CPP_KEYWORDS,
contains: ['self', CPP_PRIMITIVE_TYPES]
},
{
begin: hljs.IDENT_RE + '::',
keywords: CPP_KEYWORDS
},
{
className: 'class',
beginKeywords: 'enum class struct union', end: /[{;:<>=]/,
contains: [
{ beginKeywords: "final class struct" },
hljs.TITLE_MODE
]
}
]),
exports: {
preprocessor: PREPROCESSOR,
strings: STRINGS,
keywords: CPP_KEYWORDS
}
};
}
/*
Language: C
Category: common, system
Website: https://en.wikipedia.org/wiki/C_(programming_language)
Requires: c-like.js
*/

@@ -10,3 +257,3 @@

function c(hljs) {
var lang = hljs.requireLanguage('c-like').rawDefinition();
const lang = cLike(hljs);
// Until C is actually different than C++ there is no reason to auto-detect C

@@ -13,0 +260,0 @@ // as it's own language since it would just fail auto-detect testing or

@@ -70,3 +70,3 @@ /*

className: 'meta',
begin: '@[a-z]\\w*(?:\\:\"[^\"]*\")?'
begin: '@[a-z]\\w*(?::"[^"]*")?'
}

@@ -73,0 +73,0 @@ ].concat(EXPRESSIONS)

@@ -99,3 +99,3 @@ /*

lexemes: SYMBOL_RE,
end: '(\\[|\\#|\\d|"|:|\\{|\\)|\\(|$)',
end: '(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',
contains: [

@@ -102,0 +102,0 @@ {

@@ -54,3 +54,3 @@ /*

className: 'variable',
begin: '\\${', end: '}'
begin: /\$\{/, end: /\}/
},

@@ -57,0 +57,0 @@ hljs.HASH_COMMENT_MODE,

@@ -189,3 +189,3 @@ const KEYWORDS = [

className: 'subst',
begin: /#\{/, end: /}/,
begin: /#\{/, end: /\}/,
keywords: KEYWORDS$1

@@ -192,0 +192,0 @@ };

/*
Language: C-like foundation grammar for C/C++ grammars
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>, Roel Deckers <admin@codingcat.nl>, Sam Wu <samsam2310@gmail.com>, Jordi Petit <jordi.petit@gmail.com>, Pieter Vantorre <pietervantorre@gmail.com>, Google Inc. (David Benjamin) <davidben@google.com>
Category: common, system
*/
/* In the future the intention is to split out the C/C++ grammars distinctly
since they are separate languages. They will likely share a common foundation
though, and this file sets the groundwork for that - so that we get the breaking
change in v10 and don't have to change the requirements again later.
See: https://github.com/highlightjs/highlight.js/issues/2146
*/
/** @type LanguageFn */
function cLike(hljs) {
function optional(s) {
return '(?:' + s + ')?';
}
// 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
var C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
contains: [{begin: /\\\n/}]
});
var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';
var NAMESPACE_RE = '[a-zA-Z_]\\w*::';
var TEMPLATE_ARGUMENT_RE = '<.*?>';
var FUNCTION_TYPE_RE = '(' +
DECLTYPE_AUTO_RE + '|' +
optional(NAMESPACE_RE) +'[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
')';
var CPP_PRIMITIVE_TYPES = {
className: 'keyword',
begin: '\\b[a-z\\d_]*_t\\b'
};
// https://en.cppreference.com/w/cpp/language/escape
// \\ \x \xFF \u2837 \u00323747 \374
var CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)';
var 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})"/,
})
]
};
var NUMBERS = {
className: 'number',
variants: [
{ begin: '\\b(0b[01\']+)' },
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
],
relevance: 0
};
var PREPROCESSOR = {
className: 'meta',
begin: /#\s*[a-z]+\b/, end: /$/,
keywords: {
'meta-keyword':
'if else elif endif define undef warning error line ' +
'pragma _Pragma ifdef ifndef include'
},
contains: [
{
begin: /\\\n/, relevance: 0
},
hljs.inherit(STRINGS, {className: 'meta-string'}),
{
className: 'meta-string',
begin: /<.*?>/, end: /$/,
illegal: '\\n',
},
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
};
var TITLE_MODE = {
className: 'title',
begin: optional(NAMESPACE_RE) + hljs.IDENT_RE,
relevance: 0
};
var FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\(';
var CPP_KEYWORDS = {
keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +
'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
'unsigned long volatile static protected bool template mutable if public friend ' +
'do goto auto void enum else break extern using asm case typeid wchar_t ' +
'short reinterpret_cast|10 default double register explicit signed typename try this ' +
'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +
'concept co_await co_return co_yield requires ' +
'noexcept static_assert thread_local restrict final override ' +
'atomic_bool atomic_char atomic_schar ' +
'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
'atomic_ullong new throw return ' +
'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',
built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +
'auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set ' +
'unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos ' +
'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +
'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +
'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +
'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +
'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +
'vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary',
literal: 'true false nullptr NULL'
};
var EXPRESSION_CONTAINS = [
PREPROCESSOR,
CPP_PRIMITIVE_TYPES,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
NUMBERS,
STRINGS
];
var 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
};
var 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
},
{
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 {
aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'],
keywords: CPP_KEYWORDS,
// the base c-like language will NEVER be auto-detected, rather the
// derivitives: c, c++, arduino turn auto-detect back on for themselves
disableAutodetect: true,
illegal: '</',
contains: [].concat(
EXPRESSION_CONTEXT,
FUNCTION_DECLARATION,
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)\\s*<', end: '>',
keywords: CPP_KEYWORDS,
contains: ['self', CPP_PRIMITIVE_TYPES]
},
{
begin: hljs.IDENT_RE + '::',
keywords: CPP_KEYWORDS
},
{
className: 'class',
beginKeywords: 'enum class struct union', end: /[{;:<>=]/,
contains: [
{ beginKeywords: "final class struct" },
hljs.TITLE_MODE
]
}
]),
exports: {
preprocessor: PREPROCESSOR,
strings: STRINGS,
keywords: CPP_KEYWORDS
}
};
}
/*
Language: C++
Category: common, system
Website: https://isocpp.org
Requires: c-like.js
*/

@@ -10,3 +257,3 @@

function cpp(hljs) {
var lang = hljs.requireLanguage('c-like').rawDefinition();
const lang = cLike(hljs);
// return auto-detection back on

@@ -13,0 +260,0 @@ lang.disableAutodetect = false;

@@ -92,3 +92,3 @@ /*

className: 'attr',
begin: /([A-Za-z\$_\#][\w_-]+)=/,
begin: /([A-Za-z$_#][\w_-]+)=/,
relevance: 0

@@ -95,0 +95,0 @@ },

@@ -12,4 +12,4 @@ /*

var CRYSTAL_IDENT_RE = '[a-zA-Z_]\\w*[!?=]?';
var CRYSTAL_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?';
var CRYSTAL_PATH_RE = '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?';
var CRYSTAL_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?';
var CRYSTAL_PATH_RE = '[A-Za-z_]\\w*(::\\w+)*(\\?|!)?';
var CRYSTAL_KEYWORDS = {

@@ -26,3 +26,3 @@ $pattern: CRYSTAL_IDENT_RE,

className: 'subst',
begin: '#{', end: '}',
begin: /#\{/, end: /\}/,
keywords: CRYSTAL_KEYWORDS

@@ -54,3 +54,3 @@ };

{begin: '%[Qwi]?\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
{begin: '%[Qwi]?{', end: '}', contains: recursiveParen('{', '}')},
{begin: '%[Qwi]?\\{', end: /\}/, contains: recursiveParen(/\{/, /\}/)},
{begin: '%[Qwi]?<', end: '>', contains: recursiveParen('<', '>')},

@@ -67,3 +67,3 @@ {begin: '%[Qwi]?\\|', end: '\\|'},

{begin: '%q\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
{begin: '%q{', end: '}', contains: recursiveParen('{', '}')},
{begin: '%q\\{', end: /\}/, contains: recursiveParen(/\{/, /\}/)},
{begin: '%q<', end: '>', contains: recursiveParen('<', '>')},

@@ -76,3 +76,3 @@ {begin: '%q\\|', end: '\\|'},

var REGEXP = {
begin: '(?!%})(' + hljs.RE_STARTERS_RE + '|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*',
begin: '(?!%\\})(' + hljs.RE_STARTERS_RE + '|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*',
keywords: 'case if select unless until when while',

@@ -97,3 +97,3 @@ contains: [

{begin: '%r\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
{begin: '%r{', end: '}', contains: recursiveParen('{', '}')},
{begin: '%r\\{', end: /\}/, contains: recursiveParen(/\{/, /\}/)},
{begin: '%r<', end: '>', contains: recursiveParen('<', '>')},

@@ -171,3 +171,3 @@ {begin: '%r\\|', end: '\\|'},

className: 'symbol',
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:',
begin: hljs.UNDERSCORE_IDENT_RE + '(!|\\?)?:',
relevance: 0

@@ -174,0 +174,0 @@ },

@@ -173,3 +173,3 @@ /*

className: 'subst',
begin: '{', end: '}',
begin: /\{/, end: /\}/,
keywords: KEYWORDS

@@ -182,3 +182,3 @@ };

illegal: /\n/,
contains: [{begin: '{{'}, {begin: '}}'}, hljs.BACKSLASH_ESCAPE, SUBST_NO_LF]
contains: [{begin: /\{\{/}, {begin: /\}\}/}, hljs.BACKSLASH_ESCAPE, SUBST_NO_LF]
};

@@ -188,7 +188,7 @@ var INTERPOLATED_VERBATIM_STRING = {

begin: /\$@"/, end: '"',
contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST]
contains: [{begin: /\{\{/}, {begin: /\}\}/}, {begin: '""'}, SUBST]
};
var INTERPOLATED_VERBATIM_STRING_NO_LF = hljs.inherit(INTERPOLATED_VERBATIM_STRING, {
illegal: /\n/,
contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST_NO_LF]
contains: [{begin: /\{\{/}, {begin: /\}\}/}, {begin: '""'}, SUBST_NO_LF]
});

@@ -325,3 +325,3 @@ SUBST.contains = [

className: 'function',
begin: '(' + TYPE_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*(\\<.+\\>)?\\s*\\(', returnBegin: true,
begin: '(' + TYPE_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*(<.+>)?\\s*\\(', returnBegin: true,
end: /\s*[{;=]/, excludeEnd: true,

@@ -333,3 +333,3 @@ keywords: KEYWORDS,

{
begin: hljs.IDENT_RE + '\\s*(\\<.+\\>)?\\s*\\(', returnBegin: true,
begin: hljs.IDENT_RE + '\\s*(<.+>)?\\s*\\(', returnBegin: true,
contains: [

@@ -336,0 +336,0 @@ hljs.TITLE_MODE,

@@ -48,6 +48,6 @@ /*

var AT_MODIFIERS = "and or not only";
var AT_PROPERTY_RE = /@\-?\w[\w]*(\-\w+)*/; // @-webkit-keyframes
var AT_PROPERTY_RE = /@-?\w[\w]*(-\w+)*/; // @-webkit-keyframes
var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
var RULE = {
begin: /(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/, returnBegin: true, end: ';', endsWithParent: true,
begin: /(?:[A-Z_.-]+|--[a-zA-Z0-9_-]+)\s*:/, returnBegin: true, end: ';', endsWithParent: true,
contains: [

@@ -81,3 +81,3 @@ ATTRIBUTE

className: 'selector-pseudo',
begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/
begin: /:(:)?[a-zA-Z0-9_+()"'.-]+/
},

@@ -125,3 +125,3 @@ // matching these here allows us to treat them more like regular CSS

{
begin: '{', end: '}',
begin: /\{/, end: /\}/,
illegal: /\S/,

@@ -128,0 +128,0 @@ contains: [

@@ -21,4 +21,4 @@ /*

variants: [{
begin: '\\${',
end: '}'
begin: /\$\{/,
end: /\}/
}],

@@ -159,3 +159,3 @@ keywords: 'true false null this is new super',

beginKeywords: 'class interface',
end: '{',
end: /\{/,
excludeEnd: true,

@@ -162,0 +162,0 @@ contains: [{

@@ -19,5 +19,5 @@ /*

variants: [
{begin: /^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},
{begin: /^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},
{begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/},
{begin: /^\-\-\- +\d+,\d+ +\-\-\-\-$/}
{begin: /^--- +\d+,\d+ +----$/}
]

@@ -29,7 +29,9 @@ },

{begin: /Index: /, end: /$/},
{begin: /^index/, end: /$/},
{begin: /={3,}/, end: /$/},
{begin: /^\-{3}/, end: /$/},
{begin: /^-{3}/, end: /$/},
{begin: /^\*{3} /, end: /$/},
{begin: /^\+{3}/, end: /$/},
{begin: /^\*{15}$/ }
{begin: /^\*{15}$/ },
{begin: /^diff --git/, end: /$/},
]

@@ -39,11 +41,11 @@ },

className: 'addition',
begin: '^\\+', end: '$'
begin: /^\+/, end: /$/
},
{
className: 'deletion',
begin: '^\\-', end: '$'
begin: /^-/, end: /$/
},
{
className: 'addition',
begin: '^\\!', end: '$'
begin: /^!/, end: /$/
}

@@ -50,0 +52,0 @@ ]

@@ -37,7 +37,7 @@ /*

contains: [
hljs.COMMENT(/\{%\s*comment\s*%}/, /\{%\s*endcomment\s*%}/),
hljs.COMMENT(/\{#/, /#}/),
hljs.COMMENT(/\{%\s*comment\s*%\}/, /\{%\s*endcomment\s*%\}/),
hljs.COMMENT(/\{#/, /#\}/),
{
className: 'template-tag',
begin: /\{%/, end: /%}/,
begin: /\{%/, end: /%\}/,
contains: [

@@ -70,3 +70,3 @@ {

className: 'template-variable',
begin: /\{\{/, end: /}}/,
begin: /\{\{/, end: /\}\}/,
contains: [FILTER]

@@ -73,0 +73,0 @@ }

@@ -18,3 +18,3 @@ /*

className: 'string',
begin: '[\\w-?]+:\\w+', end: '\\W',
begin: /[\w\-?]+:\w+/, end: /\W/,
relevance: 0

@@ -24,3 +24,3 @@ };

className: 'string',
begin: '\\w+-?\\w+', end: '\\W',
begin: /\w+-?\w+/, end: /\W/,
relevance: 0

@@ -34,3 +34,3 @@ };

className: 'keyword',
begin: '^dsconfig', end: '\\s', excludeEnd: true,
begin: '^dsconfig', end: /\s/, excludeEnd: true,
relevance: 10

@@ -40,3 +40,4 @@ },

className: 'built_in',
begin: '(list|create|get|set|delete)-(\\w+)', end: '\\s', excludeEnd: true,
begin: /(list|create|get|set|delete)-(\w+)/,
end: /\s/, excludeEnd: true,
illegal: '!@#$%^&*()',

@@ -47,3 +48,3 @@ relevance: 10

className: 'built_in',
begin: '--(\\w+)', end: '\\s', excludeEnd: true
begin: /--(\w+)/, end: /\s/, excludeEnd: true
},

@@ -50,0 +51,0 @@ QUOTED_PROPERTY,

@@ -62,3 +62,3 @@ /*

className: 'variable',
begin: '\\&[a-z\\d_]*\\b'
begin: /&[a-z\d_]*\b/
};

@@ -88,3 +88,3 @@

className: 'class',
begin: /[a-zA-Z_][a-zA-Z\d_@]*\s{/,
begin: /[a-zA-Z_][a-zA-Z\d_@]*\s\{/,
end: /[{;=]/,

@@ -97,4 +97,4 @@ returnBegin: true,

className: 'class',
begin: '/\\s*{',
end: '};',
begin: '/\\s*\\{',
end: /\};/,
relevance: 10,

@@ -101,0 +101,0 @@ contains: [

@@ -12,3 +12,3 @@ /*

className: "attribute",
begin: /^[ ]*[a-zA-Z][a-zA-Z-_]*([\s-_]+[a-zA-Z][a-zA-Z]*)*/
begin: /^[ ]*[a-zA-Z][a-zA-Z_-]*([\s_-]+[a-zA-Z][a-zA-Z]*)*/
};

@@ -15,0 +15,0 @@

@@ -10,4 +10,4 @@ /*

function elixir(hljs) {
var ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?';
var ELIXIR_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
var ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?';
var ELIXIR_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
var ELIXIR_KEYWORDS = {

@@ -21,3 +21,3 @@ $pattern: ELIXIR_IDENT_RE,

className: 'subst',
begin: '#\\{', end: '}',
begin: /#\{/, end: /\}/,
keywords: ELIXIR_KEYWORDS

@@ -65,3 +65,3 @@ };

{ begin: /\{/, end: /\}/ },
{ begin: /\</, end: /\>/ }
{ begin: /</, end: />/ }
]

@@ -142,3 +142,3 @@ };

className: 'variable',
begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))'
begin: '(\\$\\W)|((\\$|@@?)(\\w+))'
},

@@ -145,0 +145,0 @@ {

@@ -13,4 +13,4 @@ /*

hljs.COMMENT(
'{-',
'-}',
/\{-/,
/-\}/,
{

@@ -39,3 +39,3 @@ contains: ['self']

var RECORD = {
begin: '{', end: '}',
begin: /\{/, end: /\}/,
contains: LIST.contains

@@ -42,0 +42,0 @@ };

@@ -46,3 +46,3 @@ /*

var TUPLE = {
begin: '{', end: '}',
begin: /\{/, end: /\}/,
relevance: 0

@@ -69,3 +69,3 @@ // "contains" defined later

{
begin: '{', end: '}',
begin: /\{/, end: /\}/,
relevance: 0

@@ -72,0 +72,0 @@ // "contains" defined later

@@ -26,3 +26,3 @@ /*

// regex in both fortran and irpf90 should match
begin: '(?=\\b|\\+|\\-|\\.)(?:\\.|\\d+\\.?)\\d*([de][+-]?\\d+)?(_[a-z_\\d]+)?',
begin: '(?=\\b|\\+|-|\\.)(?:\\.|\\d+\\.?)\\d*([de][+-]?\\d+)?(_[a-z_\\d]+)?',
relevance: 0

@@ -29,0 +29,0 @@ };

@@ -44,3 +44,3 @@ /*

variants: [
{begin: /\=[lgenxc]=/},
{begin: /=[lgenxc]=/},
{begin: /\$/},

@@ -81,3 +81,3 @@ ]

className: 'comment',
begin: /([ ]*[a-z0-9&#*=?@>\\<:\-,()$\[\]_.{}!+%^]+)+/,
begin: /([ ]*[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+)+/,
relevance: 0

@@ -84,0 +84,0 @@ },

@@ -10,3 +10,3 @@ /*

var GCODE_IDENT_RE = '[A-Z_][A-Z0-9_.]*';
var GCODE_CLOSE_RE = '\\%';
var GCODE_CLOSE_RE = '%';
var GCODE_KEYWORDS = {

@@ -13,0 +13,0 @@ $pattern: GCODE_IDENT_RE,

@@ -119,3 +119,3 @@ /**

className: 'class',
beginKeywords: 'class interface trait enum', end: '{',
beginKeywords: 'class interface trait enum', end: /\{/,
illegal: ':',

@@ -122,0 +122,0 @@ contains: [

@@ -52,4 +52,4 @@ /*

{
begin: '{\\s*',
end: '\\s*}',
begin: /\{\s*/,
end: /\s*\}/,
contains: [

@@ -108,5 +108,5 @@ {

{
begin: '#{',
begin: /#\{/,
starts: {
end: '}',
end: /\}/,
subLanguage: 'ruby'

@@ -113,0 +113,0 @@ }

@@ -187,3 +187,3 @@ /**

starts: hljs.inherit(HELPER_PARAMETERS, {
end: /}}/,
end: /\}\}/,
})

@@ -201,3 +201,3 @@ });

starts: hljs.inherit(HELPER_PARAMETERS, {
end: /}}/,
end: /\}\}/,
})

@@ -204,0 +204,0 @@ });

@@ -14,4 +14,4 @@ /*

hljs.COMMENT(
'{-',
'-}',
/\{-/,
/-\}/,
{

@@ -26,3 +26,3 @@ contains: ['self']

className: 'meta',
begin: '{-#', end: '#-}'
begin: /\{-#/, end: /#-\}/
};

@@ -54,3 +54,3 @@

var RECORD = {
begin: '{', end: '}',
begin: /\{/, end: /\}/,
contains: LIST.contains

@@ -57,0 +57,0 @@ };

@@ -35,3 +35,3 @@ /*

{ className: 'subst', // interpolation
begin: '\\$', end: '\\W}'
begin: '\\$', end: /\W\}/
}

@@ -38,0 +38,0 @@ ]

@@ -25,3 +25,3 @@ /*

className: 'string',
begin: '{"', end: '"}',
begin: /\{"/, end: /"\}/,
contains: [hljs.BACKSLASH_ESCAPE]

@@ -28,0 +28,0 @@ },

@@ -187,3 +187,3 @@ /**

starts: hljs.inherit(HELPER_PARAMETERS, {
end: /}}/,
end: /\}\}/,
})

@@ -201,3 +201,3 @@ });

starts: hljs.inherit(HELPER_PARAMETERS, {
end: /}}/,
end: /\}\}/,
})

@@ -204,0 +204,0 @@ });

@@ -59,3 +59,3 @@ /**

variants: [
{ begin: /([\+\-]+)?[\d]+_[\d_]+/ },
{ begin: /([+-]+)?[\d]+_[\d_]+/ },
{ begin: hljs.NUMBER_RE }

@@ -73,3 +73,3 @@ ]

{ begin: /\$[\w\d"][\w\d_]*/ },
{ begin: /\$\{(.*?)}/ }
{ begin: /\$\{(.*?)\}/ }
]

@@ -76,0 +76,0 @@ };

@@ -80,3 +80,3 @@ /*

// regex in both fortran and irpf90 should match
begin: '(?=\\b|\\+|\\-|\\.)(?:\\.|\\d+\\.?)\\d*([de][+-]?\\d+)?(_[a-z_\\d]+)?',
begin: '(?=\\b|\\+|-|\\.)(?:\\.|\\d+\\.?)\\d*([de][+-]?\\d+)?(_[a-z_\\d]+)?',
relevance: 0

@@ -83,0 +83,0 @@ }

@@ -1,46 +0,1 @@

/**
* @param {string} value
* @returns {RegExp}
* */
/**
* @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 optional(re) {
return concat('(', re, ')?');
}
/**
* @param {...(RegExp | string) } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
return joined;
}
/**
* Any of the passed expresssions may match
*
* Creates a huge this | this | that | that match
* @param {(RegExp | string)[] } args
* @returns {string}
*/
function either(...args) {
const joined = '(' + args.map((x) => source(x)).join("|") + ")";
return joined;
}
/*

@@ -73,40 +28,34 @@ Language: Java

};
/**
* A given sequence, possibly with underscores
* @type {(s: string | RegExp) => string} */
var SEQUENCE_ALLOWING_UNDERSCORES = (seq) => concat('[', seq, ']+([', seq, '_]*[', seq, ']+)?');
var JAVA_NUMBER_MODE = {
// https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10
var decimalDigits = '[0-9](_*[0-9])*';
var frac = `\\.(${decimalDigits})`;
var hexDigits = '[0-9a-fA-F](_*[0-9a-fA-F])*';
var NUMBER = {
className: 'number',
variants: [
{ begin: `\\b(0[bB]${SEQUENCE_ALLOWING_UNDERSCORES('01')})[lL]?` }, // binary
{ begin: `\\b(0${SEQUENCE_ALLOWING_UNDERSCORES('0-7')})[dDfFlL]?` }, // octal
{
begin: concat(
/\b0[xX]/,
either(
concat(SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9'), /\./, SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9')),
concat(SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9'), /\.?/),
concat(/\./, SEQUENCE_ALLOWING_UNDERSCORES('a-fA-F0-9'))
),
/([pP][+-]?(\d+))?/,
/[fFdDlL]?/ // decimal & fp mixed for simplicity
)
},
// scientific notation
{ begin: concat(
/\b/,
either(
concat(/\d*\./, SEQUENCE_ALLOWING_UNDERSCORES("\\d")), // .3, 3.3, 3.3_3
SEQUENCE_ALLOWING_UNDERSCORES("\\d") // 3, 3_3
),
/[eE][+-]?[\d]+[dDfF]?/)
},
// decimal & fp mixed for simplicity
{ begin: concat(
/\b/,
SEQUENCE_ALLOWING_UNDERSCORES(/\d/),
optional(/\.?/),
optional(SEQUENCE_ALLOWING_UNDERSCORES(/\d/)),
/[dDfFlL]?/)
}
// DecimalFloatingPointLiteral
// including ExponentPart
{ begin: `(\\b(${decimalDigits})((${frac})|\\.)?|(${frac}))` +
`[eE][+-]?(${decimalDigits})[fFdD]?\\b` },
// excluding ExponentPart
{ begin: `\\b(${decimalDigits})((${frac})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
{ begin: `(${frac})[fFdD]?\\b` },
{ begin: `\\b(${decimalDigits})[fFdD]\\b` },
// HexadecimalFloatingPointLiteral
{ begin: `\\b0[xX]((${hexDigits})\\.?|(${hexDigits})?\\.(${hexDigits}))` +
`[pP][+-]?(${decimalDigits})[fFdD]?\\b` },
// DecimalIntegerLiteral
{ begin: '\\b(0|[1-9](_*[0-9])*)[lL]?\\b' },
// HexIntegerLiteral
{ begin: `\\b0[xX](${hexDigits})[lL]?\\b` },
// OctalIntegerLiteral
{ begin: '\\b0(_*[0-7])*[lL]?\\b' },
// BinaryIntegerLiteral
{ begin: '\\b0[bB][01](_*[01])*[lL]?\\b' },
],

@@ -207,3 +156,3 @@ relevance: 0

hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
NUMBER,
hljs.C_BLOCK_COMMENT_MODE

@@ -216,3 +165,3 @@ ]

},
JAVA_NUMBER_MODE,
NUMBER,
ANNOTATION

@@ -219,0 +168,0 @@ ]

@@ -164,10 +164,2 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

/**
* @param {RegExp | string } re
* @returns {string}
*/
function optional(re) {
return concat('(', re, ')?');
}
/**
* @param {...(RegExp | string) } args

@@ -242,25 +234,32 @@ * @returns {string}

};
const nonDecimalLiterals = (prefixLetters, validChars) =>
`\\b0[${prefixLetters}][${validChars}]([${validChars}_]*[${validChars}])?n?`;
const noLeadingZeroDecimalDigits = /[1-9]([0-9_]*\d)?/;
const decimalDigits = /\d([0-9_]*\d)?/;
const exponentPart = concat(/[eE][+-]?/, decimalDigits);
// https://tc39.es/ecma262/#sec-literals-numeric-literals
const decimalDigits = '[0-9](_?[0-9])*';
const frac = `\\.(${decimalDigits})`;
// DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral
// https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;
const NUMBER = {
className: 'number',
variants: [
{ begin: nonDecimalLiterals('bB', '01') }, // Binary literals
{ begin: nonDecimalLiterals('oO', '0-7') }, // Octal literals
{ begin: nonDecimalLiterals('xX', '0-9a-fA-F') }, // Hexadecimal literals
{ begin: concat(/\b/, noLeadingZeroDecimalDigits, 'n') }, // Non-zero BigInt literals
{ begin: concat(/(\b0)?\./, decimalDigits, optional(exponentPart)) }, // Decimal literals between 0 and 1
{ begin: concat(
/\b/,
noLeadingZeroDecimalDigits,
optional(concat(/\./, optional(decimalDigits))), // fractional part
optional(exponentPart)
) }, // Decimal literals >= 1
{ begin: /\b0[\.n]?/ }, // Zero literals (`0`, `0.`, `0n`)
// DecimalLiteral
{ begin: `(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))` +
`[eE][+-]?(${decimalDigits})\\b` },
{ begin: `\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\b` },
// DecimalBigIntegerLiteral
{ begin: `\\b(0|[1-9](_?[0-9])*)n\\b` },
// NonDecimalIntegerLiteral
{ begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
{ begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
{ begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
// LegacyOctalIntegerLiteral (does not include underscore separators)
// https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
{ begin: "\\b0[0-7]+n?\\b" },
],
relevance: 0
};
const SUBST = {

@@ -362,4 +361,4 @@ className: 'subst',

// it from ending too early by matching another }
begin: /{/,
end: /}/,
begin: /\{/,
end: /\}/,
keywords: KEYWORDS$1,

@@ -535,2 +534,7 @@ contains: [

{
// prevent this from getting swallowed up by function
// since they appear "function like"
beginKeywords: "while if switch catch for"
},
{
className: 'function',

@@ -547,3 +551,3 @@ // we have to count the parens to make sure we actually have the correct

'\\))*[^()]*' +
'\\)\\s*{', // end parens
'\\)\\s*\\{', // end parens
returnBegin:true,

@@ -570,3 +574,3 @@ contains: [

excludeEnd: true,
illegal: /[:"\[\]]/,
illegal: /[:"[\]]/,
contains: [

@@ -579,3 +583,3 @@ { beginKeywords: 'extends' },

begin: /\b(?=constructor)/,
end: /[\{;]/,
end: /[{;]/,
excludeEnd: true,

@@ -590,3 +594,3 @@ contains: [

begin: '(get|set)\\s+(?=' + IDENT_RE$1 + '\\()',
end: /{/,
end: /\{/,
keywords: "get set",

@@ -593,0 +597,0 @@ contains: [

@@ -25,3 +25,3 @@ /*

var OBJECT = {
begin: '{', end: '}',
begin: /\{/, end: /\}/,
contains: [

@@ -28,0 +28,0 @@ {

@@ -5,3 +5,3 @@ /*

Author: Kenta Sato <bicycle1885@gmail.com>
Contributors: Alex Arslan <ararslan@comcast.net>
Contributors: Alex Arslan <ararslan@comcast.net>, Fredrik Ekre <ekrefredrik@gmail.com>
Website: https://julialang.org

@@ -13,76 +13,319 @@ */

// to maintain them by hand. Hence these names (i.e. keywords, literals and
// built-ins) are automatically generated from Julia v0.6 itself through
// built-ins) are automatically generated from Julia 1.5.2 itself through
// the following scripts for each.
// ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names
// ref: https://docs.julialang.org/en/v1/manual/variables/#Allowed-Variable-Names
var VARIABLE_NAME_RE = '[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*';
// # keyword generator, multi-word keywords handled manually below (Julia 1.5.2)
// import REPL.REPLCompletions
// res = String["in", "isa", "where"]
// for kw in collect(x.keyword for x in REPLCompletions.complete_keyword(""))
// if !(contains(kw, " ") || kw == "struct")
// push!(res, kw)
// end
// end
// sort!(unique!(res))
// foreach(x -> println("\'", x, "\',"), res)
var KEYWORD_LIST = [
'baremodule',
'begin',
'break',
'catch',
'ccall',
'const',
'continue',
'do',
'else',
'elseif',
'end',
'export',
'false',
'finally',
'for',
'function',
'global',
'if',
'import',
'in',
'isa',
'let',
'local',
'macro',
'module',
'quote',
'return',
'true',
'try',
'using',
'where',
'while',
];
// # literal generator (Julia 1.5.2)
// import REPL.REPLCompletions
// res = String["true", "false"]
// for compl in filter!(x -> isa(x, REPLCompletions.ModuleCompletion) && (x.parent === Base || x.parent === Core),
// REPLCompletions.completions("", 0)[1])
// try
// v = eval(Symbol(compl.mod))
// if !(v isa Function || v isa Type || v isa TypeVar || v isa Module || v isa Colon)
// push!(res, compl.mod)
// end
// catch e
// end
// end
// sort!(unique!(res))
// foreach(x -> println("\'", x, "\',"), res)
var LITERAL_LIST = [
'ARGS',
'C_NULL',
'DEPOT_PATH',
'ENDIAN_BOM',
'ENV',
'Inf',
'Inf16',
'Inf32',
'Inf64',
'InsertionSort',
'LOAD_PATH',
'MergeSort',
'NaN',
'NaN16',
'NaN32',
'NaN64',
'PROGRAM_FILE',
'QuickSort',
'RoundDown',
'RoundFromZero',
'RoundNearest',
'RoundNearestTiesAway',
'RoundNearestTiesUp',
'RoundToZero',
'RoundUp',
'VERSION|0',
'devnull',
'false',
'im',
'missing',
'nothing',
'pi',
'stderr',
'stdin',
'stdout',
'true',
'undef',
'π',
'ℯ',
];
// # built_in generator (Julia 1.5.2)
// import REPL.REPLCompletions
// res = String[]
// for compl in filter!(x -> isa(x, REPLCompletions.ModuleCompletion) && (x.parent === Base || x.parent === Core),
// REPLCompletions.completions("", 0)[1])
// try
// v = eval(Symbol(compl.mod))
// if (v isa Type || v isa TypeVar) && (compl.mod != "=>")
// push!(res, compl.mod)
// end
// catch e
// end
// end
// sort!(unique!(res))
// foreach(x -> println("\'", x, "\',"), res)
var BUILT_IN_LIST = [
'AbstractArray',
'AbstractChannel',
'AbstractChar',
'AbstractDict',
'AbstractDisplay',
'AbstractFloat',
'AbstractIrrational',
'AbstractMatrix',
'AbstractRange',
'AbstractSet',
'AbstractString',
'AbstractUnitRange',
'AbstractVecOrMat',
'AbstractVector',
'Any',
'ArgumentError',
'Array',
'AssertionError',
'BigFloat',
'BigInt',
'BitArray',
'BitMatrix',
'BitSet',
'BitVector',
'Bool',
'BoundsError',
'CapturedException',
'CartesianIndex',
'CartesianIndices',
'Cchar',
'Cdouble',
'Cfloat',
'Channel',
'Char',
'Cint',
'Cintmax_t',
'Clong',
'Clonglong',
'Cmd',
'Colon',
'Complex',
'ComplexF16',
'ComplexF32',
'ComplexF64',
'CompositeException',
'Condition',
'Cptrdiff_t',
'Cshort',
'Csize_t',
'Cssize_t',
'Cstring',
'Cuchar',
'Cuint',
'Cuintmax_t',
'Culong',
'Culonglong',
'Cushort',
'Cvoid',
'Cwchar_t',
'Cwstring',
'DataType',
'DenseArray',
'DenseMatrix',
'DenseVecOrMat',
'DenseVector',
'Dict',
'DimensionMismatch',
'Dims',
'DivideError',
'DomainError',
'EOFError',
'Enum',
'ErrorException',
'Exception',
'ExponentialBackOff',
'Expr',
'Float16',
'Float32',
'Float64',
'Function',
'GlobalRef',
'HTML',
'IO',
'IOBuffer',
'IOContext',
'IOStream',
'IdDict',
'IndexCartesian',
'IndexLinear',
'IndexStyle',
'InexactError',
'InitError',
'Int',
'Int128',
'Int16',
'Int32',
'Int64',
'Int8',
'Integer',
'InterruptException',
'InvalidStateException',
'Irrational',
'KeyError',
'LinRange',
'LineNumberNode',
'LinearIndices',
'LoadError',
'MIME',
'Matrix',
'Method',
'MethodError',
'Missing',
'MissingException',
'Module',
'NTuple',
'NamedTuple',
'Nothing',
'Number',
'OrdinalRange',
'OutOfMemoryError',
'OverflowError',
'Pair',
'PartialQuickSort',
'PermutedDimsArray',
'Pipe',
'ProcessFailedException',
'Ptr',
'QuoteNode',
'Rational',
'RawFD',
'ReadOnlyMemoryError',
'Real',
'ReentrantLock',
'Ref',
'Regex',
'RegexMatch',
'RoundingMode',
'SegmentationFault',
'Set',
'Signed',
'Some',
'StackOverflowError',
'StepRange',
'StepRangeLen',
'StridedArray',
'StridedMatrix',
'StridedVecOrMat',
'StridedVector',
'String',
'StringIndexError',
'SubArray',
'SubString',
'SubstitutionString',
'Symbol',
'SystemError',
'Task',
'TaskFailedException',
'Text',
'TextDisplay',
'Timer',
'Tuple',
'Type',
'TypeError',
'TypeVar',
'UInt',
'UInt128',
'UInt16',
'UInt32',
'UInt64',
'UInt8',
'UndefInitializer',
'UndefKeywordError',
'UndefRefError',
'UndefVarError',
'Union',
'UnionAll',
'UnitRange',
'Unsigned',
'Val',
'Vararg',
'VecElement',
'VecOrMat',
'Vector',
'VersionNumber',
'WeakKeyDict',
'WeakRef',
];
var KEYWORDS = {
$pattern: VARIABLE_NAME_RE,
// # keyword generator, multi-word keywords handled manually below
// foreach(println, ["in", "isa", "where"])
// for kw in Base.REPLCompletions.complete_keyword("")
// if !(contains(kw, " ") || kw == "struct")
// println(kw)
// end
// end
keyword:
'in isa where ' +
'baremodule begin break catch ccall const continue do else elseif end export false finally for function ' +
'global if import importall let local macro module quote return true try using while ' +
// legacy, to be deprecated in the next release
'type immutable abstract bitstype typealias ',
// # literal generator
// println("true")
// println("false")
// for name in Base.REPLCompletions.completions("", 0)[1]
// try
// v = eval(Symbol(name))
// if !(v isa Function || v isa Type || v isa TypeVar || v isa Module || v isa Colon)
// println(name)
// end
// end
// end
literal:
'true false ' +
'ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort ' +
'NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway ' +
'RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im ' +
'nothing pi γ π φ ',
// # built_in generator:
// for name in Base.REPLCompletions.completions("", 0)[1]
// try
// v = eval(Symbol(name))
// if v isa Type || v isa TypeVar
// println(name)
// end
// end
// end
built_in:
'ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet ' +
'AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat ' +
'AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal '+
'BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException ' +
'CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager ' +
'Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ' +
'ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t ' +
'Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict ' +
'DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ' +
'ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function ' +
'Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear ' +
'IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException ' +
'InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix ' +
'MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict ' +
'OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe ' +
'PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ' +
'ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode ' +
'RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed ' +
'SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange ' +
'StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal ' +
'Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry ' +
'TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError ' +
'UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector ' +
'VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool '
keyword: KEYWORD_LIST.join(" "),
literal: LITERAL_LIST.join(" "),
built_in: BUILT_IN_LIST.join(" "),
};

@@ -95,3 +338,3 @@

// ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/
// ref: https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/
var NUMBER = {

@@ -98,0 +341,0 @@ className: 'number',

@@ -42,3 +42,3 @@ /*

className: 'subst',
begin: '\\${', end: '}', contains: [hljs.C_NUMBER_MODE]
begin: /\$\{/, end: /\}/, contains: [hljs.C_NUMBER_MODE]
};

@@ -45,0 +45,0 @@ var VARIABLE = {

@@ -14,3 +14,3 @@ /*

begin: '#+' + '[A-Za-z_0-9]*' + '\\(',
end:' {',
end:/ \{/,
returnBegin: true,

@@ -17,0 +17,0 @@ excludeEnd: true,

@@ -11,3 +11,3 @@ /*

var IDENT_RE = '[\\w-]+'; // yes, Less identifiers may begin with a digit
var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';
var INTERP_IDENT_RE = '(' + IDENT_RE + '|@\\{' + IDENT_RE + '\\})';

@@ -46,3 +46,3 @@ /* Generic Modes */

IDENT_MODE('variable', '@@?' + IDENT_RE, 10),
IDENT_MODE('variable', '@{' + IDENT_RE + '}'),
IDENT_MODE('variable', '@\\{' + IDENT_RE + '\\}'),
IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string

@@ -59,3 +59,3 @@ { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):

var VALUE_WITH_RULESETS = VALUE.concat({
begin: '{', end: '}', contains: RULES
begin: /\{/, end: /\}/, contains: RULES
});

@@ -113,3 +113,3 @@

}, {
begin: INTERP_IDENT_RE, end: '{'
begin: INTERP_IDENT_RE, end: /\{/
}],

@@ -125,3 +125,3 @@ returnBegin: true,

IDENT_MODE('keyword', 'all\\b'),
IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise it’s identified as tag
IDENT_MODE('variable', '@\\{' + IDENT_RE + '\\}'), // otherwise it’s identified as tag
IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes "tags"

@@ -132,3 +132,3 @@ IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),

{className: 'selector-attr', begin: '\\[', end: '\\]'},
{className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},
{className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9_\-+()"'.]+/},
{begin: '\\(', end: '\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins

@@ -135,0 +135,0 @@ {begin: '!important'} // eat !important after mixin call or it will be colored as tag

@@ -9,5 +9,5 @@ /*

function lisp(hljs) {
var LISP_IDENT_RE = '[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*';
var LISP_IDENT_RE = '[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*';
var MEC_RE = '\\|[^]*?\\|';
var LISP_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?';
var LISP_SIMPLE_NUMBER_RE = '(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?';
var LITERAL = {

@@ -14,0 +14,0 @@ className: 'literal',

@@ -168,3 +168,3 @@ /*

].concat(COMMENT_MODES),
illegal: ';$|^\\[|^=|&|{'
illegal: ';$|^\\[|^=|&|\\{'
};

@@ -171,0 +171,0 @@ }

@@ -198,7 +198,7 @@ const KEYWORDS = [

};
var JS_IDENT_RE = '[A-Za-z$_](?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';
var JS_IDENT_RE = '[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
var SUBST = {
className: 'subst',
begin: /#\{/, end: /}/,
begin: /#\{/, end: /\}/,
keywords: KEYWORDS$1

@@ -208,3 +208,3 @@ };

className: 'subst',
begin: /#[A-Za-z$_]/, end: /(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,
begin: /#[A-Za-z$_]/, end: /(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,
keywords: KEYWORDS$1

@@ -285,3 +285,3 @@ };

var SYMBOLS = {
begin: '(#=>|=>|\\|>>|-?->|\\!->)'
begin: '(#=>|=>|\\|>>|-?->|!->)'
};

@@ -304,3 +304,3 @@

{
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?', end: '\\->\\*?'
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B->\\*?', end: '->\\*?'
},

@@ -307,0 +307,0 @@ {

@@ -0,1 +1,26 @@

/**
* @param {string} value
* @returns {RegExp}
* */
/**
* @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) } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
return joined;
}
/*

@@ -7,8 +32,61 @@ Language: LLVM IR

Category: assembler
Audit: 2020
*/
/** @type LanguageFn */
function llvm(hljs) {
var identifier = '([-a-zA-Z$._][\\w\\-$.]*)';
const IDENT_RE = /([-a-zA-Z$._][\w$.-]*)/;
const TYPE = {
className: 'type',
begin: /\bi\d+(?=\s|\b)/
};
const OPERATOR = {
className: 'operator',
relevance: 0,
begin: /=/
};
const PUNCTUATION = {
className: 'punctuation',
relevance: 0,
begin: /,/
};
const NUMBER = {
className: 'number',
variants: [
{ begin: /0[xX][a-fA-F0-9]+/ },
{ begin: /-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/ }
],
relevance: 0
};
const LABEL = {
className: 'symbol',
variants: [
{ begin: /^\s*[a-z]+:/ }, // labels
],
relevance: 0
};
const VARIABLE = {
className: 'variable',
variants: [
{ begin: concat(/%/, IDENT_RE) },
{ begin: /%\d+/ },
{ begin: /#\d+/ },
]
};
const FUNCTION = {
className: 'title',
variants: [
{ begin: concat(/@/, IDENT_RE) },
{ begin: /@\d+/ },
{ begin: concat(/!/, IDENT_RE) },
{ begin: concat(/!\d+/, IDENT_RE) },
// https://llvm.org/docs/LangRef.html#namedmetadatastructure
// obviously a single digit can also be used in this fashion
{ begin: /!\d+/ }
]
};
return {
name: 'LLVM IR',
// TODO: split into different categories of keywords
keywords:

@@ -53,10 +131,8 @@ 'begin end true false declare define global ' +

contains: [
{
className: 'keyword',
begin: 'i\\d+'
},
hljs.COMMENT(
';', '\\n', {relevance: 0}
),
// Double quote string
TYPE,
// this matches "empty comments"...
// ...because it's far more likely this is a statement terminator in
// another language than an actual comment
hljs.COMMENT(/;\s*$/, null, { relevance: 0 }),
hljs.COMMENT(/;/, /$/),
hljs.QUOTE_STRING_MODE,

@@ -67,31 +143,11 @@ {

// Double-quoted string
{ begin: '"', end: '[^\\\\]"' },
],
relevance: 0
},
{
className: 'title',
variants: [
{ begin: '@' + identifier },
{ begin: '@\\d+' },
{ begin: '!' + identifier },
{ begin: '!\\d+' + identifier }
{ begin: /"/, end: /[^\\]"/ },
]
},
{
className: 'symbol',
variants: [
{ begin: '%' + identifier },
{ begin: '%\\d+' },
{ begin: '#\\d+' },
]
},
{
className: 'number',
variants: [
{ begin: '0[xX][a-fA-F0-9]+' },
{ begin: '-?\\d+(?:[.]\\d+)?(?:[eE][-+]?\\d+(?:[.]\\d+)?)?' }
],
relevance: 0
},
FUNCTION,
PUNCTUATION,
OPERATOR,
VARIABLE,
LABEL,
NUMBER
]

@@ -98,0 +154,0 @@ };

@@ -34,18 +34,18 @@ /*

{
begin: '\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b'
begin: '\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b'
},
{
begin: '\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(?:ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(?:_TAG)?|CREATOR|ATTACHED_(?:POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALLOW_UNSIT|ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(?:INVALID_(?:AGENT|LINK_OBJECT)|NO(?:T_EXPERIENCE|_(?:ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b'
begin: '\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)|UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|EYE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHANNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(START|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABCD]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PARCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RADIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b'
},
{
begin: '\\b(?:FALSE|TRUE)\\b'
begin: '\\b(FALSE|TRUE)\\b'
},
{
begin: '\\b(?:ZERO_ROTATION)\\b'
begin: '\\b(ZERO_ROTATION)\\b'
},
{
begin: '\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b'
begin: '\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b'
},
{
begin: '\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b'
begin: '\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b'
}

@@ -57,3 +57,3 @@ ]

className: 'built_in',
begin: '\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|SitOnLink|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b'
begin: '\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Region|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMask|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotation)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key|Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Get|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouches|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Randomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)List|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b'
};

@@ -79,6 +79,6 @@

{
begin: '\\b(?:state|default)\\b'
begin: '\\b(state|default)\\b'
},
{
begin: '\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b'
begin: '\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experience_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|transaction_result)\\b'
}

@@ -91,3 +91,3 @@ ]

className: 'type',
begin: '\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b'
begin: '\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b'
}

@@ -94,0 +94,0 @@ ]

@@ -0,1 +1,26 @@

/**
* @param {string} value
* @returns {RegExp}
* */
/**
* @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) } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
return joined;
}
/*

@@ -11,3 +36,3 @@ Language: Markdown

const INLINE_HTML = {
begin: '<', end: '>',
begin: /<\/?[A-Za-z_]/, end: '>',
subLanguage: 'xml',

@@ -62,4 +87,16 @@ relevance: 0

};
const URL_SCHEME = /[A-Za-z][A-Za-z0-9+.-]*/;
const LINK = {
begin: '\\[.+?\\][\\(\\[].*?[\\)\\]]',
variants: [
// too much like nested array access in so many languages
// to have any real relevance
{ begin: /\[.+?\]\[.*?\]/, relevance: 0 },
// popular internet URLs
{ begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, relevance: 2 },
{ begin: concat(/\[.+?\]\(/, URL_SCHEME, /:\/\/.*?\)/), relevance: 2 },
// relative urls
{ begin: /\[.+?\]\([./?&#].*?\)/, relevance: 1 },
// whatever else, lower relevance (might not be a link at all)
{ begin: /\[.+?\]\(.*?\)/, relevance: 0 }
],
returnBegin: true,

@@ -69,19 +106,22 @@ contains: [

className: 'string',
relevance: 0,
begin: '\\[', end: '\\]',
excludeBegin: true,
returnEnd: true,
relevance: 0
},
{
className: 'link',
relevance: 0,
begin: '\\]\\(', end: '\\)',
excludeBegin: true, excludeEnd: true
excludeBegin: true,
excludeEnd: true
},
{
className: 'symbol',
relevance: 0,
begin: '\\]\\[', end: '\\]',
excludeBegin: true, excludeEnd: true
excludeBegin: true,
excludeEnd: true
}
],
relevance: 10
]
};

@@ -88,0 +128,0 @@ const BOLD = {

@@ -87,3 +87,3 @@ /*

{
begin: /\]|}|\)/,
begin: /\]|\}|\)/,
relevance: 0,

@@ -101,4 +101,4 @@ starts: TRANSPOSE

},
hljs.COMMENT('^\\s*\\%\\{\\s*$', '^\\s*\\%\\}\\s*$'),
hljs.COMMENT('\\%', '$')
hljs.COMMENT('^\\s*%\\{\\s*$', '^\\s*%\\}\\s*$'),
hljs.COMMENT('%', '$')
]

@@ -105,0 +105,0 @@ };

@@ -227,3 +227,3 @@ /*

{ // eats variables
begin: '[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)'
begin: /[$%@](\^\w\b|#\w+|[^\s\w{]|\{\w+\}|\w+)/
},

@@ -230,0 +230,0 @@ hljs.C_LINE_COMMENT_MODE,

@@ -39,3 +39,3 @@ /*

'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' +
'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\.hb)?|jr(\.hb)?|lbu?|lhu?|' +
'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|' +
'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' +

@@ -45,9 +45,9 @@ 'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' +

// floating-point instructions
'abs\.[sd]|add\.[sd]|alnv.ps|bc1[ft]l?|' +
'c\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\.[sd]|' +
'(ceil|floor|round|trunc)\.[lw]\.[sd]|cfc1|cvt\.d\.[lsw]|' +
'cvt\.l\.[dsw]|cvt\.ps\.s|cvt\.s\.[dlw]|cvt\.s\.p[lu]|cvt\.w\.[dls]|' +
'div\.[ds]|ldx?c1|luxc1|lwx?c1|madd\.[sd]|mfc1|mov[fntz]?\.[ds]|' +
'msub\.[sd]|mth?c1|mul\.[ds]|neg\.[ds]|nmadd\.[ds]|nmsub\.[ds]|' +
'p[lu][lu]\.ps|recip\.fmt|r?sqrt\.[ds]|sdx?c1|sub\.[ds]|suxc1|' +
'abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|' +
'c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|' +
'(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|' +
'cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|' +
'div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|' +
'msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|' +
'p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|' +
'swx?c1|' +

@@ -62,3 +62,3 @@ // system control instructions

// lines ending with ; or # aren't really comments, probably auto-detect fail
hljs.COMMENT('[;#](?!\s*$)', '$'),
hljs.COMMENT('[;#](?!\\s*$)', '$'),
hljs.C_BLOCK_COMMENT_MODE,

@@ -96,3 +96,4 @@ hljs.QUOTE_STRING_MODE,

],
illegal: '\/'
// forward slashes are not allowed
illegal: /\//
};

@@ -99,0 +100,0 @@ }

@@ -27,3 +27,3 @@ /*

className: 'subst',
begin: /#\{/, end: /}/,
begin: /#\{/, end: /\}/,
keywords: KEYWORDS

@@ -30,0 +30,0 @@ };

@@ -14,4 +14,4 @@ /*

{begin: /\$\d+/},
{begin: /\$\{/, end: /}/},
{begin: '[\\$\\@]' + hljs.UNDERSCORE_IDENT_RE}
{begin: /\$\{/, end: /\}/},
{begin: /[$@]/ + hljs.UNDERSCORE_IDENT_RE}
]

@@ -48,5 +48,5 @@ };

variants: [
{begin: "\\s\\^", end: "\\s|{|;", returnEnd: true},
{begin: "\\s\\^", end: "\\s|\\{|;", returnEnd: true},
// regexp locations (~, ~*)
{begin: "~\\*?\\s+", end: "\\s|{|;", returnEnd: true},
{begin: "~\\*?\\s+", end: "\\s|\\{|;", returnEnd: true},
// *.example.com

@@ -79,4 +79,4 @@ {begin: "\\*(\\.[a-z\\-]+)+"},

{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s+{', returnBegin: true,
end: '{',
begin: hljs.UNDERSCORE_IDENT_RE + '\\s+\\{', returnBegin: true,
end: /\{/,
contains: [

@@ -91,3 +91,3 @@ {

{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s', end: ';|{', returnBegin: true,
begin: hljs.UNDERSCORE_IDENT_RE + '\\s', end: ';|\\{', returnBegin: true,
contains: [

@@ -94,0 +94,0 @@ {

@@ -31,4 +31,4 @@ /*

className: 'meta', // Actually pragma
begin: /{\./,
end: /\.}/,
begin: /\{\./,
end: /\.\}/,
relevance: 10

@@ -35,0 +35,0 @@ }, {

@@ -22,3 +22,3 @@ /*

begin: /\$\{/,
end: /}/,
end: /\}/,
keywords: NIX_KEYWORDS

@@ -25,0 +25,0 @@ };

@@ -17,3 +17,3 @@ /*

className: 'variable',
begin: /\$+{[\w\.:-]+}/
begin: /\$+\{[\w.:-]+\}/
};

@@ -25,3 +25,3 @@

begin: /\$+\w+/,
illegal: /\(\){}/
illegal: /\(\)\{\}/
};

@@ -32,3 +32,3 @@

className: 'variable',
begin: /\$+\([\w\^\.:-]+\)/
begin: /\$+\([\w^.:-]+\)/
};

@@ -45,3 +45,3 @@

className: 'keyword',
begin: /\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|searchparse|searchreplace|system|tempfile|undef|verbose|warning)/
begin: /!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|searchparse|searchreplace|system|tempfile|undef|verbose|warning)/
};

@@ -58,3 +58,3 @@

className: 'class',
begin: /\w+\:\:\w+/
begin: /\w+::\w+/
};

@@ -61,0 +61,0 @@

@@ -95,3 +95,3 @@ /*

className: 'class',
begin: '(' + CLASS_KEYWORDS.keyword.split(' ').join('|') + ')\\b', end: '({|$)', excludeEnd: true,
begin: '(' + CLASS_KEYWORDS.keyword.split(' ').join('|') + ')\\b', end: /(\{|$)/, excludeEnd: true,
keywords: CLASS_KEYWORDS,

@@ -98,0 +98,0 @@ contains: [

@@ -42,3 +42,3 @@ /*

beginKeywords: 'module function',
end: '\\=|\\{',
end: /=|\{/,
contains: [PARAMS, hljs.UNDERSCORE_TITLE_MODE]

@@ -45,0 +45,0 @@ };

@@ -21,4 +21,4 @@ /*

var CURLY_COMMENT = hljs.COMMENT(
'{',
'}',
/\{/,
/\}/,
{

@@ -25,0 +25,0 @@ relevance: 0

@@ -11,4 +11,4 @@ /*

var CURLY_SUBCOMMENT = hljs.COMMENT(
'{',
'}',
/\{/,
/\}/,
{

@@ -24,4 +24,4 @@ contains: ['self']

hljs.COMMENT(
'\\^rem{',
'}',
/\\^rem\{/,
/\}/,
{

@@ -45,7 +45,7 @@ relevance: 10,

className: 'variable',
begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?'
begin: /\$\{?[\w\-.:]+\}?/
},
{
className: 'keyword',
begin: '\\^[\\w\\-\\.\\:]+'
begin: /\^[\w\-.:]+/
},

@@ -52,0 +52,0 @@ {

@@ -37,3 +37,3 @@ /*

var METHOD = {
begin: '->{', end: '}'
begin: /->\{/, end: /\}/
// contains defined later

@@ -44,4 +44,4 @@ };

{begin: /\$\d/},
{begin: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},
{begin: /[\$%@][^\s\w{]/, relevance: 0}
{begin: /[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/},
{begin: /[$%@][^\s\w{]/, relevance: 0}
]

@@ -54,4 +54,4 @@ };

hljs.COMMENT(
'^\\=\\w',
'\\=cut',
/^=\w/,
/=cut/,
{

@@ -83,3 +83,3 @@ endsWithParent: true

{
begin: 'q[qwxr]?\\s*\\<', end: '\\>',
begin: 'q[qwxr]?\\s*<', end: '>',
relevance: 5

@@ -103,3 +103,3 @@ },

{
begin: '{\\w+}',
begin: /\{\w+\}/,
contains: [],

@@ -109,3 +109,3 @@ relevance: 0

{
begin: '\-?\\w+\\s*\\=\\>',
begin: '-?\\w+\\s*=>',
contains: [],

@@ -112,0 +112,0 @@ relevance: 0

@@ -302,3 +302,3 @@ /*

// "[a-z]:" is legal (as part of array slice), but improbabal.
illegal: /:==|\W\s*\(\*|(^|\s)\$[a-z]|{{|[a-z]:\s*$|\.\.\.|TO:|DO:/,
illegal: /:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,
contains: [

@@ -305,0 +305,0 @@ // special handling of some words, which are reserved only in some contexts

@@ -14,6 +14,7 @@ /*

function php(hljs) {
var VARIABLE = {
const VARIABLE = {
className: 'variable',
begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
};
var PREPROCESSOR = {
const PREPROCESSOR = {
className: 'meta',

@@ -26,3 +27,3 @@ variants: [

};
var SUBST = {
const SUBST = {
className: 'subst',

@@ -34,10 +35,10 @@ variants: [

};
var SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, {
const SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, {
illegal: null,
});
var DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, {
const DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, {
illegal: null,
contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST),
});
var HEREDOC = hljs.END_SAME_AS_BEGIN({
const HEREDOC = hljs.END_SAME_AS_BEGIN({
begin: /<<<[ \t]*(\w+)\n/,

@@ -47,3 +48,3 @@ end: /[ \t]*(\w+)\b/,

});
var STRING = {
const STRING = {
className: 'string',

@@ -63,4 +64,4 @@ contains: [hljs.BACKSLASH_ESCAPE, PREPROCESSOR],

};
var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};
var KEYWORDS = {
const NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};
const KEYWORDS = {
keyword:

@@ -152,4 +153,4 @@ // Magic constants:

className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
illegal: /[:\(\$"]/,
beginKeywords: 'class interface', end: /\{/, excludeEnd: true,
illegal: /[:($"]/,
contains: [

@@ -162,3 +163,3 @@ {beginKeywords: 'extends implements'},

beginKeywords: 'namespace', end: ';',
illegal: /[\.']/,
illegal: /[.']/,
contains: [hljs.UNDERSCORE_TITLE_MODE]

@@ -165,0 +166,0 @@ },

@@ -175,3 +175,3 @@ /*

className: 'selector-tag',
begin: /\@\B/,
begin: /@\B/,
relevance: 0

@@ -178,0 +178,0 @@ };

@@ -54,11 +54,9 @@ /*

var CHAR_CODE = {
className: 'string', // 0'a etc.
begin: /0\'(\\\'|.)/
begin: /0'(\\'|.)/
};
var SPACE_CODE = {
className: 'string',
begin: /0\'\\s/ // 0'\s
begin: /0'\\s/ // 0'\s
};

@@ -65,0 +63,0 @@

@@ -197,8 +197,35 @@ /*

// https://docs.python.org/3.9/reference/lexical_analysis.html#numeric-literals
const digitpart = '[0-9](_?[0-9])*';
const pointfloat = `(\\b(${digitpart}))?\\.(${digitpart})|\\b(${digitpart})\\.`;
const NUMBER = {
className: 'number', relevance: 0,
variants: [
{begin: hljs.BINARY_NUMBER_RE + '[lLjJ]?'},
{begin: '\\b(0o[0-7]+)[lLjJ]?'},
{begin: hljs.C_NUMBER_RE + '[lLjJ]?'}
// exponentfloat, pointfloat
// https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
// optionally imaginary
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
// Note: no leading \b because floats can start with a decimal point
// and we don't want to mishandle e.g. `fn(.5)`,
// no trailing \b for pointfloat because it can end with a decimal point
// and we don't want to mishandle e.g. `0..hex()`; this should be safe
// because both MUST contain a decimal point and so cannot be confused with
// the interior part of an identifier
{ begin: `(\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?\\b` },
{ begin: `(${pointfloat})[jJ]?` },
// decinteger, bininteger, octinteger, hexinteger
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
// optionally "long" in Python 2
// https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
// decinteger is optionally imaginary
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
{ begin: '\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b' },
{ begin: '\\b0[bB](_?[01])+[lL]?\\b' },
{ begin: '\\b0[oO](_?[0-7])+[lL]?\\b' },
{ begin: '\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b' },
// imagnumber (digitpart-based)
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
{ begin: `\\b(${digitpart})[jJ]\\b` },
]

@@ -252,3 +279,4 @@ };

className: 'meta',
begin: /^[\t ]*@/, end: /$/
begin: /^[\t ]*@/, end: /(?=#)|$/,
contains: [NUMBER, PARAMS, STRING]
},

@@ -255,0 +283,0 @@ {

@@ -0,1 +1,26 @@

/**
* @param {string} value
* @returns {RegExp}
* */
/**
* @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) } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
return joined;
}
/*

@@ -93,3 +118,3 @@ Language: QML

var QML_OBJECT = {
begin: QML_IDENT_RE + '\\s*{', end: '{',
begin: concat(QML_IDENT_RE, /\s*\{/), end: /\{/,
returnBegin: true,

@@ -96,0 +121,0 @@ relevance: 0,

@@ -28,3 +28,3 @@ /*

var RE_PARAM = RE_IDENT + '(' + RE_PARAM_TYPE + ')?(' + RE_PARAM_TYPE + ')?';
var RE_OPERATOR = "(" + orReValues(['||', '&&', '++', '**', '+.', '*', '/', '*.', '/.', '...', '|>']) + "|==|===)";
var RE_OPERATOR = "(" + orReValues(['||', '++', '**', '+.', '*', '/', '*.', '/.', '...']) + "|\\|>|&&|==|===)";
var RE_OPERATOR_SPACED = "\\s+" + RE_OPERATOR + "\\s+";

@@ -57,3 +57,3 @@

{
begin: '\\(\\-' + RE_NUMBER + '\\)'
begin: '\\(-' + RE_NUMBER + '\\)'
}

@@ -233,4 +233,4 @@ ]

{
begin: "\\b(" + RE_MODULE_IDENT + "\\.)+{",
end: "}"
begin: "\\b(" + RE_MODULE_IDENT + "\\.)+\\{",
end: /\}/
}

@@ -247,5 +247,5 @@ ],

keywords: KEYWORDS,
illegal: '(:\\-|:=|\\${|\\+=)',
illegal: '(:-|:=|\\$\\{|\\+=)',
contains: [
hljs.COMMENT('/\\*', '\\*/', { illegal: '^(\\#,\\/\\/)' }),
hljs.COMMENT('/\\*', '\\*/', { illegal: '^(#,\\/\\/)' }),
{

@@ -281,3 +281,3 @@ className: 'character',

begin: RE_OPERATOR_SPACED,
illegal: '\\-\\->',
illegal: '-->',
relevance: 0

@@ -291,4 +291,4 @@ },

className: 'module-def',
begin: "\\bmodule\\s+" + RE_IDENT + "\\s+" + RE_MODULE_IDENT + "\\s+=\\s+{",
end: "}",
begin: "\\bmodule\\s+" + RE_IDENT + "\\s+" + RE_MODULE_IDENT + "\\s+=\\s+\\{",
end: /\}/,
returnBegin: true,

@@ -304,4 +304,4 @@ keywords: KEYWORDS,

{
begin: '{',
end: '}',
begin: /\{/,
end: /\}/,
skip: true

@@ -308,0 +308,0 @@ }

@@ -40,3 +40,3 @@ /*

begin: '^facet ' + IDENTIFIER,
end: '}',
end: /\}/,
keywords: 'facet',

@@ -52,3 +52,3 @@ contains: [

begin: '^\\s*instance of ' + IDENTIFIER,
end: '}',
end: /\}/,
keywords: 'name count channels instance-data instance-state instance of',

@@ -66,3 +66,3 @@ illegal: /\S/,

begin: '^' + IDENTIFIER,
end: '}',
end: /\}/,
contains: [

@@ -69,0 +69,0 @@ PROPERTY,

@@ -15,26 +15,26 @@ /*

function routeros(hljs) {
const STATEMENTS = 'foreach do while for if from to step else on-error and or not in';
var STATEMENTS = 'foreach do while for if from to step else on-error and or not in';
// Global commands: Every global command should start with ":" token, otherwise it will be treated as variable.
var GLOBAL_COMMANDS = 'global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime';
const GLOBAL_COMMANDS = 'global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime';
// Common commands: Following commands available from most sub-menus:
var COMMON_COMMANDS = 'add remove enable disable set get print export edit find run debug error info warning';
const COMMON_COMMANDS = 'add remove enable disable set get print export edit find run debug error info warning';
var LITERALS = 'true false yes no nothing nil null';
const LITERALS = 'true false yes no nothing nil null';
var OBJECTS = 'traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw';
const OBJECTS = 'traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw';
var VAR = {
const VAR = {
className: 'variable',
variants: [
{begin: /\$[\w\d#@][\w\d_]*/},
{begin: /\$\{(.*?)}/}
{ begin: /\$[\w\d#@][\w\d_]*/ },
{ begin: /\$\{(.*?)\}/ }
]
};
var QUOTE_STRING = {
const QUOTE_STRING = {
className: 'string',
begin: /"/, end: /"/,
begin: /"/,
end: /"/,
contains: [

@@ -45,3 +45,4 @@ hljs.BACKSLASH_ESCAPE,

className: 'variable',
begin: /\$\(/, end: /\)/,
begin: /\$\(/,
end: /\)/,
contains: [hljs.BACKSLASH_ESCAPE]

@@ -52,7 +53,8 @@ }

var APOS_STRING = {
const APOS_STRING = {
className: 'string',
begin: /'/, end: /'/
begin: /'/,
end: /'/
};
//////////////////////////////////////////////////////////////////////
return {

@@ -65,19 +67,12 @@ name: 'Microtik RouterOS script',

literal: LITERALS,
keyword: STATEMENTS + ' :' + STATEMENTS.split(' ').join(' :') + ' :' + GLOBAL_COMMANDS.split(' ').join(' :'),
keyword: STATEMENTS + ' :' + STATEMENTS.split(' ').join(' :') + ' :' + GLOBAL_COMMANDS.split(' ').join(' :')
},
contains: [
{ // недопустимые конструкции
{ // illegal syntax
variants: [
{ begin: /^@/, end: /$/, }, // dns
{ begin: /\/\*/, end: /\*\//, }, // -- comment
{ begin: /%%/, end: /$/, }, // -- comment
{ begin: /^'/, end: /$/, }, // Monkey one line comment
{ begin: /^\s*\/[\w-]+=/, end: /$/, }, // jboss-cli
{ begin: /\/\//, end: /$/, }, // Stan comment
{ begin: /^\[\</, end: /\>\]$/, }, // F# class declaration?
{ begin: /<\//, end: />/, }, // HTML tags
{ begin: /^facet /, end: /\}/, }, // roboconf - лютый костыль )))
{ begin: '^1\\.\\.(\\d+)$', end: /$/, }, // tap
{ begin: /\/\*/, end: /\*\// }, // -- comment
{ begin: /\/\//, end: /$/ }, // Stan comment
{ begin: /<\//, end: />/ }, // HTML tags
],
illegal: /./,
illegal: /./
},

@@ -89,3 +84,3 @@ hljs.COMMENT('^#', '$'),

{ // attribute=value
begin: /[\w-]+\=([^\s\{\}\[\]\(\)]+)/,
begin: /[\w-]+=([^\s{}[\]()]+)/,
relevance: 0,

@@ -100,3 +95,3 @@ returnBegin: true,

begin: /=/,
endsWithParent: true,
endsWithParent: true,
relevance: 0,

@@ -109,5 +104,10 @@ contains: [

className: 'literal',
begin: '\\b(' + LITERALS.split(' ').join('|') + ')\\b',
begin: '\\b(' + LITERALS.split(' ').join('|') + ')\\b'
},
/*{
{
// Do not format unclassified values. Needed to exclude highlighting of values as built_in.
begin: /("[^"]*"|[^\s{}[\]]+)/
}
/*
{
// IPv4 addresses and subnets

@@ -120,41 +120,40 @@ className: 'number',

]
}, // */
/*{
},
{
// MAC addresses and DHCP Client IDs
className: 'number',
begin: /\b(1:)?([0-9A-Fa-f]{1,2}[:-]){5}([0-9A-Fa-f]){1,2}\b/,
}, //*/
{
// Не форматировать не классифицированные значения. Необходимо для исключения подсветки значений как built_in.
// className: 'number',
begin: /("[^"]*"|[^\s\{\}\[\]]+)/,
}, //*/
},
*/
]
} //*/
}
]
},//*/
},
{
// HEX values
className: 'number',
begin: /\*[0-9a-fA-F]+/,
}, //*/
begin: /\*[0-9a-fA-F]+/
},
{
begin: '\\b(' + COMMON_COMMANDS.split(' ').join('|') + ')([\\s\[\(]|\])',
begin: '\\b(' + COMMON_COMMANDS.split(' ').join('|') + ')([\\s[(\\]|])',
returnBegin: true,
contains: [
{
className: 'builtin-name', //'function',
begin: /\w+/,
},
],
className: 'builtin-name', // 'function',
begin: /\w+/
}
]
},
{
className: 'built_in',
variants: [
{begin: '(\\.\\./|/|\\s)((' + OBJECTS.split(' ').join('|') + ');?\\s)+',relevance: 10,},
{begin: /\.\./,},
],
},//*/
{
begin: '(\\.\\./|/|\\s)((' + OBJECTS.split(' ').join('|') + ');?\\s)+'
},
{
begin: /\.\./,
relevance: 0
}
]
}
]

@@ -161,0 +160,0 @@ };

@@ -11,3 +11,3 @@ /*

function ruby(hljs) {
var RUBY_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
var RUBY_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
var RUBY_KEYWORDS = {

@@ -37,4 +37,4 @@ keyword:

hljs.COMMENT(
'^\\=begin',
'^\\=end',
'^=begin',
'^=end',
{

@@ -49,3 +49,3 @@ contains: [YARDOCTAG],

className: 'subst',
begin: '#\\{', end: '}',
begin: /#\{/, end: /\}/,
keywords: RUBY_KEYWORDS

@@ -60,10 +60,10 @@ };

{begin: /`/, end: /`/},
{begin: '%[qQwWx]?\\(', end: '\\)'},
{begin: '%[qQwWx]?\\[', end: '\\]'},
{begin: '%[qQwWx]?{', end: '}'},
{begin: '%[qQwWx]?<', end: '>'},
{begin: '%[qQwWx]?/', end: '/'},
{begin: '%[qQwWx]?%', end: '%'},
{begin: '%[qQwWx]?-', end: '-'},
{begin: '%[qQwWx]?\\|', end: '\\|'},
{begin: /%[qQwWx]?\(/, end: /\)/},
{begin: /%[qQwWx]?\[/, end: /\]/},
{begin: /%[qQwWx]?\{/, end: /\}/},
{begin: /%[qQwWx]?</, end: />/},
{begin: /%[qQwWx]?\//, end: /\//},
{begin: /%[qQwWx]?%/, end: /%/},
{begin: /%[qQwWx]?-/, end: /-/},
{begin: /%[qQwWx]?\|/, end: /\|/},
{

@@ -87,2 +87,26 @@ // \B in the beginning suppresses recognition of ?-sequences where ?

};
// Ruby syntax is underdocumented, but this grammar seems to be accurate
// as of version 2.7.2 (confirmed with (irb and `Ripper.sexp(...)`)
// https://docs.ruby-lang.org/en/2.7.0/doc/syntax/literals_rdoc.html#label-Numbers
var decimal = '[1-9](_?[0-9])*|0';
var digits = '[0-9](_?[0-9])*';
var NUMBER = {
className: 'number', relevance: 0,
variants: [
// decimal integer/float, optionally exponential or rational, optionally imaginary
{ begin: `\\b(${decimal})(\\.(${digits}))?([eE][+-]?(${digits})|r)?i?\\b` },
// explicit decimal/binary/octal/hexadecimal integer,
// optionally rational and/or imaginary
{ begin: "\\b0[dD][0-9](_?[0-9])*r?i?\\b" },
{ begin: "\\b0[bB][0-1](_?[0-1])*r?i?\\b" },
{ begin: "\\b0[oO][0-7](_?[0-7])*r?i?\\b" },
{ begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b" },
// 0-prefixed implicit octal integer, optionally rational and/or imaginary
{ begin: "\\b0(_?[0-7])+r?i?\\b" },
]
};
var PARAMS = {

@@ -102,3 +126,3 @@ className: 'params',

contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?'}),
hljs.inherit(hljs.TITLE_MODE, {begin: '[A-Za-z_]\\w*(::\\w+)*(\\?|!)?'}),
{

@@ -126,3 +150,3 @@ begin: '<\\s*',

className: 'symbol',
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:',
begin: hljs.UNDERSCORE_IDENT_RE + '(!|\\?)?:',
relevance: 0

@@ -136,11 +160,7 @@ },

},
NUMBER,
{
className: 'number',
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
relevance: 0
begin: '(\\$\\W)|((\\$|@@?)(\\w+))' // variables
},
{
begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))' // variables
},
{
className: 'params',

@@ -161,3 +181,3 @@ begin: /\|/, end: /\|/,

{begin: '/', end: '/[a-z]*'},
{begin: '%r{', end: '}[a-z]*'},
{begin: /%r\{/, end: /\}[a-z]*/},
{begin: '%r\\(', end: '\\)[a-z]*'},

@@ -164,0 +184,0 @@ {begin: '%r!', end: '![a-z]*'},

@@ -63,4 +63,4 @@ /*

variants: [
{begin: '#\\s+[a-zA-Z\\ \\.]*', relevance: 0}, // looks like #-comment
{begin: '#[a-zA-Z\\ \\.]+'}
{begin: '#\\s+[a-zA-Z .]*', relevance: 0}, // looks like #-comment
{begin: '#[a-zA-Z .]+'}
]

@@ -67,0 +67,0 @@ }

@@ -83,3 +83,3 @@ /*

className: 'meta',
begin: '#\\!?\\[', end: '\\]',
begin: '#!?\\[', end: '\\]',
contains: [

@@ -102,3 +102,3 @@ {

className: 'class',
beginKeywords: 'trait enum struct union', end: '{',
beginKeywords: 'trait enum struct union', end: /\{/,
contains: [

@@ -105,0 +105,0 @@ hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})

@@ -95,3 +95,3 @@ /*

className: 'keyword',
begin: /^\s*(proc [\w\d_]+|data|run|quit)[\s\;]/
begin: /^\s*(proc [\w\d_]+|data|run|quit)[\s;]/
},

@@ -101,3 +101,3 @@ {

className: 'variable',
begin: /\&[a-zA-Z_\&][a-zA-Z0-9_]*\.?/
begin: /&[a-zA-Z_&][a-zA-Z0-9_]*\.?/
},

@@ -104,0 +104,0 @@ {

@@ -18,3 +18,3 @@ /*

{begin: '\\$[A-Za-z0-9_]+'},
{begin: '\\${', end: '}'}
{begin: /\$\{/, end: /\}/}
]

@@ -21,0 +21,0 @@ };

@@ -14,3 +14,3 @@ /*

var SCHEME_IDENT_RE = '[^\\(\\)\\[\\]\\{\\}",\'`;#|\\\\\\s]+';
var SCHEME_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+([./]\\d+)?';
var SCHEME_SIMPLE_NUMBER_RE = '(-|\\+)?\\d+([./]\\d+)?';
var SCHEME_COMPLEX_NUMBER_RE = SCHEME_SIMPLE_NUMBER_RE + '[+\\-]' + SCHEME_SIMPLE_NUMBER_RE + 'i';

@@ -17,0 +17,0 @@ var KEYWORDS = {

@@ -46,3 +46,3 @@ /*

{
className: 'selector-id', begin: '\\#[A-Za-z0-9_-]+',
className: 'selector-id', begin: '#[A-Za-z0-9_-]+',
relevance: 0

@@ -49,0 +49,0 @@ },

@@ -44,7 +44,7 @@ /*

{
begin: '\\s('+smali_instr_low_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)+\\s',
begin: '\\s('+smali_instr_low_prio.join('|')+')((-|/)[a-zA-Z0-9]+)+\\s',
relevance: 10
},
{
begin: '\\s('+smali_instr_high_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)*\\s',
begin: '\\s('+smali_instr_high_prio.join('|')+')((-|/)[a-zA-Z0-9]+)*\\s',
relevance: 10

@@ -51,0 +51,0 @@ },

@@ -47,3 +47,3 @@ /*

{
begin: '\\#\\(', end: '\\)',
begin: '#\\(', end: '\\)',
contains: [

@@ -50,0 +50,0 @@ hljs.APOS_STRING_MODE,

@@ -125,3 +125,3 @@ /*

var LOOKAHEAD_TAG_END = '(?=[\\.\\s\\n\\[\\:,])';
var LOOKAHEAD_TAG_END = '(?=[.\\s\\n[:,])';

@@ -376,3 +376,3 @@ var ATTRIBUTES = [

{
begin: '\\#[a-zA-Z][a-zA-Z0-9_-]*' + LOOKAHEAD_TAG_END,
begin: '#[a-zA-Z][a-zA-Z0-9_-]*' + LOOKAHEAD_TAG_END,
className: 'selector-id'

@@ -379,0 +379,0 @@ },

@@ -13,2 +13,5 @@ /*

var SWIFT_KEYWORDS = {
// override the pattern since the default of of /\w+/ is not sufficient to
// capture the keywords that start with the character "#"
$pattern: /[\w#]+/,
keyword: '#available #colorLiteral #column #else #elseif #endif #file ' +

@@ -22,3 +25,3 @@ '#fileLiteral #function #if #imageLiteral #line #selector #sourceLocation ' +

'prefix private protocol Protocol public repeat required rethrows return ' +
'right self Self set static struct subscript super switch throw throws true ' +
'right self Self set some static struct subscript super switch throw throws true ' +
'try try! try? Type typealias unowned var weak where while willSet',

@@ -74,8 +77,27 @@ literal: 'true false nil',

};
var NUMBERS = {
// https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html#grammar_numeric-literal
// TODO: Update for leading `-` after lookbehind is supported everywhere
var decimalDigits = '([0-9]_*)+';
var hexDigits = '([0-9a-fA-F]_*)+';
var NUMBER = {
className: 'number',
begin: '\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b',
relevance: 0
relevance: 0,
variants: [
// decimal floating-point-literal (subsumes decimal-literal)
{ begin: `\\b(${decimalDigits})(\\.(${decimalDigits}))?` +
`([eE][+-]?(${decimalDigits}))?\\b` },
// hexadecimal floating-point-literal (subsumes hexadecimal-literal)
{ begin: `\\b0x(${hexDigits})(\\.(${hexDigits}))?` +
`([pP][+-]?(${decimalDigits}))?\\b` },
// octal-literal
{ begin: /\b0o([0-7]_*)+\b/ },
// binary-literal
{ begin: /\b0b([01]_*)+\b/ },
]
};
SUBST.contains = [NUMBERS];
SUBST.contains = [NUMBER];

@@ -91,6 +113,6 @@ return {

TYPE,
NUMBERS,
NUMBER,
{
className: 'function',
beginKeywords: 'func', end: '{', excludeEnd: true,
beginKeywords: 'func', end: /\{/, excludeEnd: true,
contains: [

@@ -109,3 +131,3 @@ hljs.inherit(hljs.TITLE_MODE, {

'self',
NUMBERS,
NUMBER,
STRING,

@@ -137,3 +159,3 @@ hljs.C_BLOCK_COMMENT_MODE,

'@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|' +
'@propertyWrapper)\\b'
'@propertyWrapper|@main)\\b'

@@ -140,0 +162,0 @@ },

@@ -25,3 +25,3 @@ /*

{
begin: '(\s+)?---$', end: '\\.\\.\\.$',
begin: /---$/, end: '\\.\\.\\.$',
subLanguage: 'yaml',

@@ -28,0 +28,0 @@ relevance: 0

@@ -51,6 +51,6 @@ /*

contains: [
hljs.COMMENT(/\{#/, /#}/),
hljs.COMMENT(/\{#/, /#\}/),
{
className: 'template-tag',
begin: /\{%/, end: /%}/,
begin: /\{%/, end: /%\}/,
contains: [

@@ -71,3 +71,3 @@ {

className: 'template-variable',
begin: /\{\{/, end: /}}/,
begin: /\{\{/, end: /\}\}/,
contains: ['self', FILTER, FUNCTIONS]

@@ -74,0 +74,0 @@ }

@@ -164,10 +164,2 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

/**
* @param {RegExp | string } re
* @returns {string}
*/
function optional(re) {
return concat('(', re, ')?');
}
/**
* @param {...(RegExp | string) } args

@@ -242,25 +234,32 @@ * @returns {string}

};
const nonDecimalLiterals = (prefixLetters, validChars) =>
`\\b0[${prefixLetters}][${validChars}]([${validChars}_]*[${validChars}])?n?`;
const noLeadingZeroDecimalDigits = /[1-9]([0-9_]*\d)?/;
const decimalDigits = /\d([0-9_]*\d)?/;
const exponentPart = concat(/[eE][+-]?/, decimalDigits);
// https://tc39.es/ecma262/#sec-literals-numeric-literals
const decimalDigits = '[0-9](_?[0-9])*';
const frac = `\\.(${decimalDigits})`;
// DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral
// https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;
const NUMBER = {
className: 'number',
variants: [
{ begin: nonDecimalLiterals('bB', '01') }, // Binary literals
{ begin: nonDecimalLiterals('oO', '0-7') }, // Octal literals
{ begin: nonDecimalLiterals('xX', '0-9a-fA-F') }, // Hexadecimal literals
{ begin: concat(/\b/, noLeadingZeroDecimalDigits, 'n') }, // Non-zero BigInt literals
{ begin: concat(/(\b0)?\./, decimalDigits, optional(exponentPart)) }, // Decimal literals between 0 and 1
{ begin: concat(
/\b/,
noLeadingZeroDecimalDigits,
optional(concat(/\./, optional(decimalDigits))), // fractional part
optional(exponentPart)
) }, // Decimal literals >= 1
{ begin: /\b0[\.n]?/ }, // Zero literals (`0`, `0.`, `0n`)
// DecimalLiteral
{ begin: `(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))` +
`[eE][+-]?(${decimalDigits})\\b` },
{ begin: `\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\b` },
// DecimalBigIntegerLiteral
{ begin: `\\b(0|[1-9](_?[0-9])*)n\\b` },
// NonDecimalIntegerLiteral
{ begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
{ begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
{ begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
// LegacyOctalIntegerLiteral (does not include underscore separators)
// https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
{ begin: "\\b0[0-7]+n?\\b" },
],
relevance: 0
};
const SUBST = {

@@ -362,4 +361,4 @@ className: 'subst',

// it from ending too early by matching another }
begin: /{/,
end: /}/,
begin: /\{/,
end: /\}/,
keywords: KEYWORDS$1,

@@ -535,2 +534,7 @@ contains: [

{
// prevent this from getting swallowed up by function
// since they appear "function like"
beginKeywords: "while if switch catch for"
},
{
className: 'function',

@@ -547,3 +551,3 @@ // we have to count the parens to make sure we actually have the correct

'\\))*[^()]*' +
'\\)\\s*{', // end parens
'\\)\\s*\\{', // end parens
returnBegin:true,

@@ -570,3 +574,3 @@ contains: [

excludeEnd: true,
illegal: /[:"\[\]]/,
illegal: /[:"[\]]/,
contains: [

@@ -579,3 +583,3 @@ { beginKeywords: 'extends' },

begin: /\b(?=constructor)/,
end: /[\{;]/,
end: /[{;]/,
excludeEnd: true,

@@ -590,3 +594,3 @@ contains: [

begin: '(get|set)\\s+(?=' + IDENT_RE$1 + '\\()',
end: /{/,
end: /\{/,
keywords: "get set",

@@ -593,0 +597,0 @@ contains: [

@@ -34,3 +34,3 @@ /*

className: 'class',
beginKeywords: 'class interface namespace', end: '{', excludeEnd: true,
beginKeywords: 'class interface namespace', end: /\{/, excludeEnd: true,
illegal: '[^,:\\n\\s\\.]',

@@ -37,0 +37,0 @@ contains: [

@@ -33,3 +33,3 @@ /*

},
illegal: '//|{|}|endif|gosub|variant|wend|^\\$ ', /* reserved deprecated keywords */
illegal: '//|\\{|\\}|endif|gosub|variant|wend|^\\$ ', /* reserved deprecated keywords */
contains: [

@@ -36,0 +36,0 @@ hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [{begin: '""'}]}),

@@ -47,3 +47,3 @@ /*

},
illegal: '{',
illegal: /\{/,
contains: [

@@ -50,0 +50,0 @@ hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting.

@@ -0,1 +1,54 @@

/**
* @param {string} value
* @returns {RegExp}
* */
/**
* @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 } re
* @returns {string}
*/
function optional(re) {
return concat('(', re, ')?');
}
/**
* @param {...(RegExp | string) } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
return joined;
}
/**
* Any of the passed expresssions may match
*
* Creates a huge this | this | that | that match
* @param {(RegExp | string)[] } args
* @returns {string}
*/
function either(...args) {
const joined = '(' + args.map((x) => source(x)).join("|") + ")";
return joined;
}
/*

@@ -7,3 +60,6 @@ Language: HTML, XML

/** @type LanguageFn */
function xml(hljs) {
// Element names can contain letters, digits, hyphens, underscores, and periods
var TAG_NAME_RE = concat(/[A-Z_]/, optional(/[A-Z0-9_.-]+:/), /[A-Z0-9_.-]*/);
var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';

@@ -93,3 +149,3 @@ var XML_ENTITIES = {

{
begin: '<\\!\\[CDATA\\[', end: '\\]\\]>',
begin: '<!\\[CDATA\\[', end: '\\]\\]>',
relevance: 10

@@ -125,16 +181,53 @@ },

starts: {
end: '\<\/script\>', returnEnd: true,
end: /<\/script>/, returnEnd: true,
subLanguage: ['javascript', 'handlebars', 'xml']
}
},
// we need this for now for jSX
{
className: 'tag',
begin: '</?', end: '/?>',
begin: /<>|<\/>/,
},
// open tag
{
className: 'tag',
begin: concat(
/</,
lookahead(concat(
TAG_NAME_RE,
// <tag/>
// <tag>
// <tag ...
either(/\/>/, />/, /\s/)
))
),
end: /\/?>/,
contains: [{
className: 'name',
begin: TAG_NAME_RE,
relevance: 0,
starts: TAG_INTERNALS
}]
},
// close tag
{
className: 'tag',
begin: concat(
/<\//,
lookahead(concat(
TAG_NAME_RE, />/
))
),
contains: [
{
className: 'name', begin: /[^\/><\s]+/, relevance: 0
className: 'name',
begin: TAG_NAME_RE,
relevance: 0
},
TAG_INTERNALS
{
begin: />/,
relevance: 0
}
]
}
},
]

@@ -141,0 +234,0 @@ };

@@ -34,16 +34,16 @@ /*

variants: [{
begin: /\barray\:/,
end: /(?:append|filter|flatten|fold\-(?:left|right)|for-each(?:\-pair)?|get|head|insert\-before|join|put|remove|reverse|size|sort|subarray|tail)\b/
begin: /\barray:/,
end: /(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/
}, {
begin: /\bmap\:/,
end: /(?:contains|entry|find|for\-each|get|keys|merge|put|remove|size)\b/
begin: /\bmap:/,
end: /(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/
}, {
begin: /\bmath\:/,
begin: /\bmath:/,
end: /(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/
}, {
begin: /\bop\:/,
begin: /\bop:/,
end: /\(/,
excludeEnd: true
}, {
begin: /\bfn\:/,
begin: /\bfn:/,
end: /\(/,

@@ -54,12 +54,12 @@ excludeEnd: true

{
begin: /[^<\/\$\:'"-]\b(?:abs|accumulator\-(?:after|before)|adjust\-(?:date(?:Time)?|time)\-to\-timezone|analyze\-string|apply|available\-(?:environment\-variables|system\-properties)|avg|base\-uri|boolean|ceiling|codepoints?\-(?:equal|to\-string)|collation\-key|collection|compare|concat|contains(?:\-token)?|copy\-of|count|current(?:\-)?(?:date(?:Time)?|time|group(?:ing\-key)?|output\-uri|merge\-(?:group|key))?data|dateTime|days?\-from\-(?:date(?:Time)?|duration)|deep\-equal|default\-(?:collation|language)|distinct\-values|document(?:\-uri)?|doc(?:\-available)?|element\-(?:available|with\-id)|empty|encode\-for\-uri|ends\-with|environment\-variable|error|escape\-html\-uri|exactly\-one|exists|false|filter|floor|fold\-(?:left|right)|for\-each(?:\-pair)?|format\-(?:date(?:Time)?|time|integer|number)|function\-(?:arity|available|lookup|name)|generate\-id|has\-children|head|hours\-from\-(?:dateTime|duration|time)|id(?:ref)?|implicit\-timezone|in\-scope\-prefixes|index\-of|innermost|insert\-before|iri\-to\-uri|json\-(?:doc|to\-xml)|key|lang|last|load\-xquery\-module|local\-name(?:\-from\-QName)?|(?:lower|upper)\-case|matches|max|minutes\-from\-(?:dateTime|duration|time)|min|months?\-from\-(?:date(?:Time)?|duration)|name(?:space\-uri\-?(?:for\-prefix|from\-QName)?)?|nilled|node\-name|normalize\-(?:space|unicode)|not|number|one\-or\-more|outermost|parse\-(?:ietf\-date|json)|path|position|(?:prefix\-from\-)?QName|random\-number\-generator|regex\-group|remove|replace|resolve\-(?:QName|uri)|reverse|root|round(?:\-half\-to\-even)?|seconds\-from\-(?:dateTime|duration|time)|snapshot|sort|starts\-with|static\-base\-uri|stream\-available|string\-?(?:join|length|to\-codepoints)?|subsequence|substring\-?(?:after|before)?|sum|system\-property|tail|timezone\-from\-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type\-available|unordered|unparsed\-(?:entity|text)?\-?(?:public\-id|uri|available|lines)?|uri\-collection|xml\-to\-json|years?\-from\-(?:date(?:Time)?|duration)|zero\-or\-one)\b/,
begin: /[^<\/\$:'"-]\b(?:abs|accumulator-(?:after|before)|adjust-(?:date(?:Time)?|time)-to-timezone|analyze-string|apply|available-(?:environment-variables|system-properties)|avg|base-uri|boolean|ceiling|codepoints?-(?:equal|to-string)|collation-key|collection|compare|concat|contains(?:-token)?|copy-of|count|current(?:-)?(?:date(?:Time)?|time|group(?:ing-key)?|output-uri|merge-(?:group|key))?data|dateTime|days?-from-(?:date(?:Time)?|duration)|deep-equal|default-(?:collation|language)|distinct-values|document(?:-uri)?|doc(?:-available)?|element-(?:available|with-id)|empty|encode-for-uri|ends-with|environment-variable|error|escape-html-uri|exactly-one|exists|false|filter|floor|fold-(?:left|right)|for-each(?:-pair)?|format-(?:date(?:Time)?|time|integer|number)|function-(?:arity|available|lookup|name)|generate-id|has-children|head|hours-from-(?:dateTime|duration|time)|id(?:ref)?|implicit-timezone|in-scope-prefixes|index-of|innermost|insert-before|iri-to-uri|json-(?:doc|to-xml)|key|lang|last|load-xquery-module|local-name(?:-from-QName)?|(?:lower|upper)-case|matches|max|minutes-from-(?:dateTime|duration|time)|min|months?-from-(?:date(?:Time)?|duration)|name(?:space-uri-?(?:for-prefix|from-QName)?)?|nilled|node-name|normalize-(?:space|unicode)|not|number|one-or-more|outermost|parse-(?:ietf-date|json)|path|position|(?:prefix-from-)?QName|random-number-generator|regex-group|remove|replace|resolve-(?:QName|uri)|reverse|root|round(?:-half-to-even)?|seconds-from-(?:dateTime|duration|time)|snapshot|sort|starts-with|static-base-uri|stream-available|string-?(?:join|length|to-codepoints)?|subsequence|substring-?(?:after|before)?|sum|system-property|tail|timezone-from-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type-available|unordered|unparsed-(?:entity|text)?-?(?:public-id|uri|available|lines)?|uri-collection|xml-to-json|years?-from-(?:date(?:Time)?|duration)|zero-or-one)\b/,
}, {
begin: /\blocal\:/,
begin: /\blocal:/,
end: /\(/,
excludeEnd: true
}, {
begin: /\bzip\:/,
end: /(?:zip\-file|(?:xml|html|text|binary)\-entry| (?:update\-)?entries)\b/
begin: /\bzip:/,
end: /(?:zip-file|(?:xml|html|text|binary)-entry| (?:update-)?entries)\b/
}, {
begin: /\b(?:util|db|functx|app|xdmp|xmldb)\:/,
begin: /\b(?:util|db|functx|app|xdmp|xmldb):/,
end: /\(/,

@@ -79,3 +79,3 @@ excludeEnd: true

className: 'variable',
begin: /[\$][\w-:]+/
begin: /[$][\w\-:]+/
};

@@ -112,3 +112,3 @@

className: 'meta',
begin: /%[\w-:]+/
begin: /%[\w\-:]+/
};

@@ -132,3 +132,3 @@

beginKeywords: 'element attribute comment document processing-instruction',
end: '{',
end: /\{/,
excludeEnd: true

@@ -143,4 +143,4 @@ };

contains: [{
begin: '{',
end: '}',
begin: /\{/,
end: /\}/,
subLanguage: 'xquery'

@@ -150,3 +150,2 @@ }, 'self']

var CONTAINS = [

@@ -164,4 +163,2 @@ VAR,

return {

@@ -168,0 +165,0 @@ name: 'XQuery',

@@ -14,3 +14,3 @@ /*

// YAML spec allows non-reserved URI characters in tags.
var URI_CHARACTERS = '[\\w#;/?:@&=+$,.~*\\\'()[\\]]+';
var URI_CHARACTERS = '[\\w#;/?:@&=+$,.~*\'()[\\]]+';

@@ -33,4 +33,4 @@ // Define keys as starting with a word character

variants: [
{ begin: '{{', end: '}}' }, // jinja templates Ansible
{ begin: '%{', end: '}' } // Ruby i18n
{ begin: /\{\{/, end: /\}\}/ }, // jinja templates Ansible
{ begin: /%\{/, end: /\}/ } // Ruby i18n
]

@@ -80,4 +80,4 @@ };

var OBJECT = {
begin: '{',
end: '}',
begin: /\{/,
end: /\}/,
contains: [VALUE_CONTAINER],

@@ -99,3 +99,3 @@ illegal: '\\n',

className: 'meta',
begin: '^---\s*$',
begin: '^---\\s*$',
relevance: 10

@@ -109,3 +109,3 @@ },

className: 'string',
begin: '[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*'
begin: '[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^\\n]+\\n(\\2[^\\n]+\\n?)*'
},

@@ -148,3 +148,3 @@ { // Ruby/Rails erb

// TODO: remove |$ hack when we have proper look-ahead support
begin: '\\-(?=[ ]|$)',
begin: '-(?=[ ]|$)',
relevance: 0

@@ -151,0 +151,0 @@ },

@@ -94,3 +94,3 @@ /*

className: 'class',
beginKeywords: 'class interface', end: '{', excludeEnd: true,
beginKeywords: 'class interface', end: /\{/, excludeEnd: true,
illegal: /[:\(\$"]/,

@@ -97,0 +97,0 @@ contains: [

@@ -9,3 +9,3 @@ {

"homepage": "https://highlightjs.org/",
"version": "10.3.2",
"version": "10.4.0-beta0",
"author": {

@@ -17,2 +17,18 @@ "name": "Ivan Sagalaev",

{
"name": "Egor Rogov",
"email": "e.rogov@postgrespro.ru"
},
{
"name": "Vladimir Jimenez",
"email": "me@allejo.io"
},
{
"name": "Jeremy Hull",
"email": "sourdrums@gmail.com"
},
{
"name": "Oleg Efimov",
"email": "efimovov@gmail.com"
},
{
"name": "Gidi Meir Morris",

@@ -38,18 +54,2 @@ "email": "gidi@gidi.io"

{
"name": "Josh Goebel",
"email": "hello@joshgoebel.com"
},
{
"name": "Ivan Sagalaev (original author)",
"email": "maniac@softwaremaniacs.org"
},
{
"name": "Jeremy Hull",
"email": "sourdrums@gmail.com"
},
{
"name": "Oleg Efimov",
"email": "efimovov@gmail.com"
},
{
"name": "Peter Leonov",

@@ -1145,2 +1145,42 @@ "email": "gojpeg@gmail.com"

"email": "miken32@github"
},
{
"name": "Richard Gibson",
"email": "gibson042@github"
},
{
"name": "Fredrik Ekre",
"email": "ekrefredrik@gmail.com"
},
{
"name": "Jan Pilzer",
"email": "Hirse@github"
},
{
"name": "Jonathan Sharpe",
"email": "mail@jonrshar.pe"
},
{
"name": "Michael Rush",
"email": "michaelrush@gmail.com"
},
{
"name": "Florian Bezdeka",
"email": "florian@bezdeka.de"
},
{
"name": "Marat Nagayev",
"email": "nagaevmt@yandex.ru"
},
{
"name": "Patrick Scheibe",
"email": "patrick@halirutan.de"
},
{
"name": "Kyle Brown",
"email": "kylebrown9@github"
},
{
"name": "Marcus Ortiz",
"email": "mportiz08@gmail.com"
}

@@ -1175,16 +1215,16 @@ ],

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"clean-css": "^4.2.3",
"cli-table": "^0.3.1",
"colors": "^1.1.2",
"commander": "^6.1.0",
"commander": "^6.2.0",
"del": "^6.0.0",
"dependency-resolver": "^2.0.1",
"eslint": "^7.11.0",
"eslint-config-standard": "^14.1.1",
"eslint": "^7.12.1",
"eslint-config-standard": "^16.0.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-standard": "^4.0.2",
"glob": "^7.1.6",

@@ -1196,12 +1236,12 @@ "glob-promise": "^3.4.0",

"lodash": "^4.17.20",
"mocha": "^8.1.3",
"rollup": "^2.29.0",
"mocha": "^8.2.1",
"rollup": "^2.33.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"should": "^13.2.3",
"terser": "^5.3.4",
"terser": "^5.3.8",
"tiny-worker": "^2.3.0",
"typescript": "^4.0.3"
"typescript": "^4.0.5"
},
"dependencies": {}
}
# Highlight.js
[![Build Status](https://travis-ci.org/highlightjs/highlight.js.svg?branch=master)](https://travis-ci.org/highlightjs/highlight.js) [![Greenkeeper badge](https://badges.greenkeeper.io/highlightjs/highlight.js.svg)](https://greenkeeper.io/) [![install size](https://packagephobia.now.sh/badge?p=highlight.js)](https://packagephobia.now.sh/result?p=highlight.js)
[![latest version](https://badgen.net/npm/v/highlight.js?label=latest)](https://www.npmjs.com/package/highlight.js)
[![license](https://badgen.net/github/license/highlightjs/highlight.js?color=cyan)](https://github.com/highlightjs/highlight.js/blob/master/LICENSE)
[![install size](https://badgen.net/packagephobia/install/highlight.js?label=npm+install)](https://packagephobia.now.sh/result?p=highlight.js)
![minified](https://img.shields.io/github/size/highlightjs/cdn-release/build/highlight.min.js?label=minified)
[![NPM downloads weekly](https://badgen.net/npm/dw/highlight.js?label=npm+downloads&color=purple)](https://www.npmjs.com/package/highlight.js)
[![jsDelivr CDN downloads](https://badgen.net/jsdelivr/hits/gh/highlightjs/cdn-release?label=jsDelivr+CDN&color=purple)](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release)
![dev deps](https://badgen.net/david/dev/highlightjs/highlight.js?label=dev+deps)
[![code quality](https://badgen.net/lgtm/grade/g/highlightjs/highlight.js/js)](https://lgtm.com/projects/g/highlightjs/highlight.js/?mode=list)
[![build and CI status](https://badgen.net/github/checks/highlightjs/highlight.js?label=build)](https://github.com/highlightjs/highlight.js/actions?query=workflow%3A%22Node.js+CI%22)
[![open issues](https://badgen.net/github/open-issues/highlightjs/highlight.js?label=issues&labelColor=orange&color=c41)](https://github.com/highlightjs/highlight.js/issues)
[![help welcome issues](https://badgen.net/github/label-issues/highlightjs/highlight.js/help%20welcome/open?labelColor=393&color=6c6)](https://github.com/highlightjs/highlight.js/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+welcome%22)
[![beginner friendly issues](https://badgen.net/github/label-issues/highlightjs/highlight.js/beginner%20friendly/open?labelColor=669&color=99c)](https://github.com/highlightjs/highlight.js/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22)
[![vulnerabilities](https://badgen.net/snyk/highlightjs/highlight.js)](https://snyk.io/test/github/highlightjs/highlight.js?targetFile=package.json)
<!-- [![Build CI](https://img.shields.io/github/workflow/status/highlightjs/highlight.js/Node.js%20CI)](https://github.com/highlightjs/highlight.js/actions?query=workflow%3A%22Node.js+CI%22) -->
<!-- [![commits since release](https://img.shields.io/github/commits-since/highlightjs/highlight.js/latest?label=commits+since)](https://github.com/highlightjs/highlight.js/commits/master) -->
<!-- [![](https://data.jsdelivr.com/v1/package/gh/highlightjs/cdn-release/badge?style=rounded)](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release) -->
<!-- [![Total Lines](https://img.shields.io/tokei/lines/github/highlightjs/highlight.js)]() -->
<!-- [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/highlight.js.svg)](https://bundlephobia.com/result?p=highlight.js) -->
Highlight.js is a syntax highlighter written in JavaScript. It works in

@@ -225,7 +245,7 @@ the browser as well as on the server. It works with pretty much any

<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script charset="UTF-8"
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/go.min.js"></script>
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/go.min.js"></script>
```

@@ -237,8 +257,15 @@

<link rel="stylesheet"
href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.3.2/build/styles/default.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.3.2/build/highlight.min.js"></script>
href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.2/build/styles/default.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.2/build/highlight.min.js"></script>
```
**unpkg** ([link](https://unpkg.com/browse/@highlightjs/cdn-assets/))
```html
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@10.3.1/styles/default.min.css">
<script src="https://unpkg.com/@highlightjs/cdn-assets@10.3.1/highlight.min.js"></script>
```
**Note:** *The CDN-hosted `highlight.min.js` package doesn't bundle every language.* It would be
very large. You can find our list "common" languages that we bundle by default on our [download page][5].
very large. You can find our list "common" languages that we bundle by default on our [download page][5].

@@ -245,0 +272,0 @@ ### Self Hosting

@@ -145,3 +145,3 @@ // For TS consumers who use Node and don't have dom in their tsconfig lib, import the necessary types here.

"on:end"?: Function,
"on:begin"?: Function,
"on:begin"?: ModeCallback
}

@@ -162,3 +162,4 @@

compiled?: boolean,
exports?: any
exports?: any,
classNameAliases?: Record<string, string>
}

@@ -165,0 +166,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc