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:
69
vendor/assets/javascripts/ace/mode-haskell.js
vendored
69
vendor/assets/javascripts/ace/mode-haskell.js
vendored
@ -6,8 +6,8 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var HaskellHighlightRules = function() {
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token:
|
||||
this.$rules = { start:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.entity.haskell',
|
||||
'keyword.operator.function.infix.haskell',
|
||||
'punctuation.definition.entity.haskell' ],
|
||||
@ -17,8 +17,8 @@ var HaskellHighlightRules = function() {
|
||||
{ token: 'constant.language.empty-list.haskell',
|
||||
regex: '\\[\\]' },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: '\\bmodule\\b',
|
||||
push:
|
||||
regex: '\\b(module|signature)\\b',
|
||||
push:
|
||||
[ { token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' },
|
||||
{ include: '#module_name' },
|
||||
{ include: '#module_exports' },
|
||||
@ -26,7 +26,7 @@ var HaskellHighlightRules = function() {
|
||||
{ defaultToken: 'meta.declaration.module.haskell' } ] },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: '\\bclass\\b',
|
||||
push:
|
||||
push:
|
||||
[ { token: 'keyword.other.haskell',
|
||||
regex: '\\bwhere\\b',
|
||||
next: 'pop' },
|
||||
@ -39,7 +39,7 @@ var HaskellHighlightRules = function() {
|
||||
{ defaultToken: 'meta.declaration.class.haskell' } ] },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: '\\binstance\\b',
|
||||
push:
|
||||
push:
|
||||
[ { token: 'keyword.other.haskell',
|
||||
regex: '\\bwhere\\b|$',
|
||||
next: 'pop' },
|
||||
@ -47,15 +47,15 @@ var HaskellHighlightRules = function() {
|
||||
{ defaultToken: 'meta.declaration.instance.haskell' } ] },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: 'import',
|
||||
push:
|
||||
[ { token: 'meta.import.haskell', regex: '$|;', next: 'pop' },
|
||||
push:
|
||||
[ { token: 'meta.import.haskell', regex: '$|;|^', next: 'pop' },
|
||||
{ token: 'keyword.other.haskell', regex: 'qualified|as|hiding' },
|
||||
{ include: '#module_name' },
|
||||
{ include: '#module_exports' },
|
||||
{ defaultToken: 'meta.import.haskell' } ] },
|
||||
{ token: [ 'keyword.other.haskell', 'meta.deriving.haskell' ],
|
||||
regex: '(deriving)(\\s*\\()',
|
||||
push:
|
||||
push:
|
||||
[ { token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' },
|
||||
{ token: 'entity.other.inherited-class.haskell',
|
||||
regex: '\\b[A-Z][a-zA-Z_\']*' },
|
||||
@ -70,7 +70,7 @@ var HaskellHighlightRules = function() {
|
||||
comment: 'Floats are always decimal' },
|
||||
{ token: 'constant.numeric.haskell',
|
||||
regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' },
|
||||
{ token:
|
||||
{ token:
|
||||
[ 'meta.preprocessor.c',
|
||||
'punctuation.definition.preprocessor.c',
|
||||
'meta.preprocessor.c' ],
|
||||
@ -79,7 +79,7 @@ var HaskellHighlightRules = function() {
|
||||
{ include: '#pragma' },
|
||||
{ token: 'punctuation.definition.string.begin.haskell',
|
||||
regex: '"',
|
||||
push:
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.haskell',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
@ -90,7 +90,7 @@ var HaskellHighlightRules = function() {
|
||||
{ token: 'constant.character.escape.control.haskell',
|
||||
regex: '\\^[A-Z@\\[\\]\\\\\\^_]' },
|
||||
{ defaultToken: 'string.quoted.double.haskell' } ] },
|
||||
{ token:
|
||||
{ token:
|
||||
[ 'punctuation.definition.string.begin.haskell',
|
||||
'string.quoted.single.haskell',
|
||||
'constant.character.escape.haskell',
|
||||
@ -99,13 +99,13 @@ var HaskellHighlightRules = function() {
|
||||
'constant.character.escape.control.haskell',
|
||||
'punctuation.definition.string.end.haskell' ],
|
||||
regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' },
|
||||
{ token:
|
||||
{ token:
|
||||
[ 'meta.function.type-declaration.haskell',
|
||||
'entity.name.function.haskell',
|
||||
'meta.function.type-declaration.haskell',
|
||||
'keyword.other.double-colon.haskell' ],
|
||||
regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=</>]+\\))(\\s*)(::)',
|
||||
push:
|
||||
push:
|
||||
[ { token: 'meta.function.type-declaration.haskell',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
@ -122,32 +122,32 @@ var HaskellHighlightRules = function() {
|
||||
regex: '[|!%$?~+:\\-.=</>\\\\]+',
|
||||
comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' },
|
||||
{ token: 'punctuation.separator.comma.haskell', regex: ',' } ],
|
||||
'#block_comment':
|
||||
'#block_comment':
|
||||
[ { token: 'punctuation.definition.comment.haskell',
|
||||
regex: '\\{-(?!#)',
|
||||
push:
|
||||
push:
|
||||
[ { include: '#block_comment' },
|
||||
{ token: 'punctuation.definition.comment.haskell',
|
||||
regex: '-\\}',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.haskell' } ] } ],
|
||||
'#comments':
|
||||
'#comments':
|
||||
[ { token: 'punctuation.definition.comment.haskell',
|
||||
regex: '--.*',
|
||||
push_:
|
||||
push_:
|
||||
[ { token: 'comment.line.double-dash.haskell',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.double-dash.haskell' } ] },
|
||||
{ include: '#block_comment' } ],
|
||||
'#infix_op':
|
||||
'#infix_op':
|
||||
[ { token: 'entity.name.function.infix.haskell',
|
||||
regex: '\\([|!%$+:\\-.=</>]+\\)|\\(,+\\)' } ],
|
||||
'#module_exports':
|
||||
'#module_exports':
|
||||
[ { token: 'meta.declaration.exports.haskell',
|
||||
regex: '\\(',
|
||||
push:
|
||||
[ { token: 'meta.declaration.exports.haskell',
|
||||
push:
|
||||
[ { token: 'meta.declaration.exports.haskell.end',
|
||||
regex: '\\)',
|
||||
next: 'pop' },
|
||||
{ token: 'entity.name.function.haskell',
|
||||
@ -158,22 +158,22 @@ var HaskellHighlightRules = function() {
|
||||
{ token: 'meta.other.unknown.haskell',
|
||||
regex: '\\(.*?\\)',
|
||||
comment: 'So named because I don\'t know what to call this.' },
|
||||
{ defaultToken: 'meta.declaration.exports.haskell' } ] } ],
|
||||
'#module_name':
|
||||
{ defaultToken: 'meta.declaration.exports.haskell.end' } ] } ],
|
||||
'#module_name':
|
||||
[ { token: 'support.other.module.haskell',
|
||||
regex: '[A-Z][A-Za-z._\']*' } ],
|
||||
'#pragma':
|
||||
'#pragma':
|
||||
[ { token: 'meta.preprocessor.haskell',
|
||||
regex: '\\{-#',
|
||||
push:
|
||||
push:
|
||||
[ { token: 'meta.preprocessor.haskell',
|
||||
regex: '#-\\}',
|
||||
next: 'pop' },
|
||||
{ token: 'keyword.other.preprocessor.haskell',
|
||||
regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' },
|
||||
{ defaultToken: 'meta.preprocessor.haskell' } ] } ],
|
||||
'#type_signature':
|
||||
[ { token:
|
||||
'#type_signature':
|
||||
[ { token:
|
||||
[ 'meta.class-constraint.haskell',
|
||||
'entity.other.inherited-class.haskell',
|
||||
'meta.class-constraint.haskell',
|
||||
@ -191,15 +191,15 @@ var HaskellHighlightRules = function() {
|
||||
{ token: 'storage.type.haskell',
|
||||
regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' },
|
||||
{ token: 'support.constant.unit.haskell', regex: '\\(\\)' },
|
||||
{ include: '#comments' } ] }
|
||||
|
||||
{ include: '#comments' } ] };
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
HaskellHighlightRules.metaData = { fileTypes: [ 'hs' ],
|
||||
keyEquivalent: '^~H',
|
||||
name: 'Haskell',
|
||||
scopeName: 'source.haskell' }
|
||||
scopeName: 'source.haskell' };
|
||||
|
||||
|
||||
oop.inherits(HaskellHighlightRules, TextHighlightRules);
|
||||
@ -228,8 +228,8 @@ oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
@ -358,12 +358,13 @@ var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
var Mode = function() {
|
||||
this.HighlightRules = HaskellHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "--";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.blockComment = null;
|
||||
this.$id = "ace/mode/haskell";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
|
Reference in New Issue
Block a user