Update ACE Editor to version 1.2.9
The new ACE editor introduces full support for emojis (and, thereby, UTF-16 characters with high- and low-surrogates). Hence, we can remove our custom fix. Further, this update will allow emojis to be used in pair programming sessions.
This commit is contained in:
117
vendor/assets/javascripts/ace/mode-vbscript.js
vendored
117
vendor/assets/javascripts/ace/mode-vbscript.js
vendored
@ -6,6 +6,39 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var VBScriptHighlightRules = function() {
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"keyword.control.asp": "If|Then|Else|ElseIf|End|While|Wend|For|To|Each|Case|Select|Return"
|
||||
+ "|Continue|Do|Until|Loop|Next|With|Exit|Function|Property|Type|Enum|Sub|IIf",
|
||||
"storage.type.asp": "Dim|Call|Class|Const|Dim|Redim|Set|Let|Get|New|Randomize|Option|Explicit",
|
||||
"storage.modifier.asp": "Private|Public|Default",
|
||||
"keyword.operator.asp": "Mod|And|Not|Or|Xor|as",
|
||||
"constant.language.asp": "Empty|False|Nothing|Null|True",
|
||||
"support.class.asp": "Application|ObjectContext|Request|Response|Server|Session",
|
||||
"support.class.collection.asp": "Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables",
|
||||
"support.constant.asp": "TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute"
|
||||
+ "|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout",
|
||||
"support.function.asp": "Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog"
|
||||
+ "|BinaryWrite|Clear|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex",
|
||||
"support.function.event.asp": "Application_OnEnd|Application_OnStart"
|
||||
+ "|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart",
|
||||
"support.function.vb.asp": "Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng"
|
||||
+ "|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial"
|
||||
+ "|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency"
|
||||
+ "|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex"
|
||||
+ "|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric"
|
||||
+ "|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim"
|
||||
+ "|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace"
|
||||
+ "|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion"
|
||||
+ "|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse"
|
||||
+ "|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year",
|
||||
"support.type.vb.asp": "vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|"
|
||||
+ "int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday"
|
||||
+ "|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek"
|
||||
+ "|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger"
|
||||
+ "|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant"
|
||||
+ "|vbDataObject|vbDecimal|vbByte|vbArray"
|
||||
}, "identifier", true);
|
||||
|
||||
this.$rules = {
|
||||
"start": [
|
||||
{
|
||||
@ -15,9 +48,7 @@ var VBScriptHighlightRules = function() {
|
||||
regex: "$"
|
||||
},
|
||||
{
|
||||
token: [
|
||||
null
|
||||
],
|
||||
token: [null],
|
||||
regex: "^(?=\\t)",
|
||||
next: "state_3"
|
||||
},
|
||||
@ -37,39 +68,17 @@ var VBScriptHighlightRules = function() {
|
||||
"variable.parameter.function.asp",
|
||||
"punctuation.definition.parameters.asp"
|
||||
],
|
||||
regex: "^(\\s*)(Function|Sub)(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))"
|
||||
regex: "^(\\s*)(Function|Sub)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))"
|
||||
},
|
||||
{
|
||||
token: "punctuation.definition.comment.asp",
|
||||
regex: "'|REM",
|
||||
regex: "'|REM(?=\\s|$)",
|
||||
next: "comment",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"keyword.control.asp"
|
||||
],
|
||||
regex: "\\b(?:If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "keyword.operator.asp",
|
||||
regex: "\\b(?:Mod|And|Not|Or|Xor|as)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "storage.type.asp",
|
||||
regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "storage.modifier.asp",
|
||||
regex: "\\b(?:Private|Public|Default)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "constant.language.asp",
|
||||
regex: "\\b(?:Empty|False|Nothing|Null|True)\\b",
|
||||
regex: "On Error Resume Next|On Error GoTo",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
@ -84,57 +93,20 @@ var VBScriptHighlightRules = function() {
|
||||
regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"
|
||||
},
|
||||
{
|
||||
token: "support.class.asp",
|
||||
regex: "\\b(?:Application|ObjectContext|Request|Response|Server|Session)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "support.class.collection.asp",
|
||||
regex: "\\b(?:Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "support.constant.asp",
|
||||
regex: "\\b(?:TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "support.function.asp",
|
||||
regex: "\\b(?:Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "support.function.event.asp",
|
||||
regex: "\\b(?:Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: "support.function.vb.asp",
|
||||
regex: "\\b(?:Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b",
|
||||
caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"constant.numeric.asp"
|
||||
],
|
||||
token: "constant.numeric.asp",
|
||||
regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"
|
||||
},
|
||||
{
|
||||
token: "support.type.vb.asp",
|
||||
regex: "\\b(?:vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b",
|
||||
caseInsensitive: true
|
||||
regex: "\\w+",
|
||||
token: keywordMapper
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"entity.name.function.asp"
|
||||
],
|
||||
token: ["entity.name.function.asp"],
|
||||
regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))"
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"keyword.operator.asp"
|
||||
],
|
||||
regex: "\\-|\\+|\\*\\\/|\\>|\\<|\\=|\\&"
|
||||
token: ["keyword.operator.asp"],
|
||||
regex: "\\-|\\+|\\*\\/|\\>|\\<|\\=|\\&"
|
||||
}
|
||||
],
|
||||
"state_3": [
|
||||
@ -194,7 +166,7 @@ var VBScriptHighlightRules = function() {
|
||||
defaultToken: "string.quoted.double.asp"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@ -212,6 +184,7 @@ var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighl
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = VBScriptHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
|
Reference in New Issue
Block a user