9 lines
8.2 KiB
JavaScript
9 lines
8.2 KiB
JavaScript
|
define("ace/mode/aiscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{include:"#comments"},{include:"#keywords"},{include:"#strings"},{include:"#back-quote"},{include:"#numeric-literal"},{include:"#boolean-literal"},{include:"#null-literal"},{include:"#undefined-literal"},{include:"#numericConstant-literal"},{include:"#array-literal"},{include:"#vars"},{include:"#math"}],"#comments":[{token:"comment.line",regex:/\/\/.*/},{token:"comment.block",regex:/### {/,push:[{token:"comment.block",regex:/}/,next:"pop"},{defaultToken:"comment.block"}]}],"#vars":[{token:"storage.modifier.aiscript",regex:/#[0-9a-zA-Z_]+/},{token:"variable.name.aiscript",regex:/\$[0-9a-zA-Z_]+/}],"#keywords":[{token:"keyword.control.aiscript",regex:/\breturn\b/}],"#strings":[{token:"string.quoted.double.aiscript",regex:/"/,push:[{token:"string.quoted.double.aiscript",regex:/"/,next:"pop"},{token:"constant.character.escape.aiscript",regex:/\\./},{defaultToken:"string.quoted.double.aiscript"}]}],"#back-quote":[{token:"string.quoted.double.aiscript",regex:/`/,push:[{token:"string.quoted.double.aiscript",regex:/`/,next:"pop"},{token:"constant.character.escape.aiscript",regex:/\\./},{defaultToken:"string.quoted.double.aiscript"}]}],"#boolean-literal":[{token:"constant.language.boolean.true.aiscript",regex:/(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))yes(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))/},{token:"constant.language.boolean.false.aiscript",regex:/(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))no(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))/}],"#numeric-literal":[{token:["constant.numeric.hex.aiscript","constant.numeric.hex.aiscript","storage.type.numeric.bigint.aiscript"],regex:/\b(?<!\$)(0)(?:x|X)([0-9a-fA-F][0-9a-fA-F_]*)((?:n)?)\b(?!\$)/},{token:["constant.numeric.binary.aiscript","constant.numeric.binary.aiscript","storage.type.numeric.bigint.aiscript"],regex:/\b(?<!\$)(0)(?:b|B)([01][01_]*)((?:n)?)\b(?!\$)/},{token:["constant.numeric.octal.aiscript","constant.numeric.octal.aiscript","storage.type.numeric.bigint.aiscript"],regex:/\b(?<!\$)(0)(?:o|O)?([0-7][0-7_]*)((?:n)?)\b(?!\$)/},{token:["text","meta.delimiter.decimal.period.aiscript","text","storage.type.numeric.bigint.aiscript","text","meta.delimiter.decimal.period.aiscript","text","storage.type.numeric.bigint.aiscript","meta.delimiter.decimal.period.aiscript","text","storage.type.numeric.bigint.aiscript","text","storage.type.numeric.bigint.aiscript","text","meta.delimiter.decimal.period.aiscript","text","storage.type.numeric.bigint.aiscript","text","meta.delimiter.decimal.period.aiscript","storage.type.numeric.bigint.aiscript","meta.delimiter.decimal.period.aiscript","text","storage.type.numeric.bigint.aiscript","text","storage.type.numeric.bigint.aiscript"],regex:/(?<!\$)(?:\b([0-9][0-9_]*)(\.)([0-9][0-9_]*[eE][+-]?[0-9][0-9_]*)((?:n)?)\b|\b([0-9][0-9_]*)(\.)([eE][+-]?[0-9][0-9_]*)((?:n)?)\b|\B(\.)([0-9][0-9_]*[eE][+-]?[0-9][0-9_]*)((?:n)?)\b|\b([0-9][0-9_]*[eE][+-]?[0-9][0-9_]*)((?:n)?)\b|\b([0-9][0-9_]*)(\.)([0-9][0-9_]*)((?:n)?)\b|\b([0-9][0-9_]*)(\.)((?:n)?)\B|\B(\.)([0-9][0-9_]*)((?:n)?)\b|\b([0-9][0-9_]*)((?:n)?)\b(?!\.))(?!\$)/}],"#null-literal":[{token:"constant.language.null.aiscript",regex:/(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))/}],"#undefined-literal":[{token:"constant.language.undefined.aiscript",regex:/(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))/}],"#math":[{token:["support.constant.math.aiscript","text","punctuation.accessor.aiscript","punctuation.accessor.optional.aiscript","text","support.function.math.aiscript","support.constant.property.math.aiscript"],regex:/(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Math)(?:(\s*)(?:(:)|(\?:(?!\s*[[:digit:]])))(\s*)(?:(abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|rnd|round|sign|sin|sinh|sqrt|tan|tanh|tr
|
||
|
(function() {
|
||
|
window.require(["ace/mode/aiscript"], function(m) {
|
||
|
if (typeof module == "object" && typeof exports == "object" && module) {
|
||
|
module.exports = m;
|
||
|
}
|
||
|
});
|
||
|
})();
|
||
|
|