fix ?? highlighting in js mode
This commit is contained in:
parent
201210fefa
commit
2ef35a2ee9
2 changed files with 2 additions and 8 deletions
|
|
@ -32,7 +32,6 @@ define(function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var oop = require("../lib/oop");
|
var oop = require("../lib/oop");
|
||||||
var unicode = require("../unicode");
|
|
||||||
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
||||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||||
|
|
||||||
|
|
@ -64,7 +63,7 @@ var JavaScriptHighlightRules = function() {
|
||||||
"constant.language":
|
"constant.language":
|
||||||
"null|Infinity|NaN|undefined",
|
"null|Infinity|NaN|undefined",
|
||||||
"support.function":
|
"support.function":
|
||||||
"alert",
|
"alert"
|
||||||
}, "identifier");
|
}, "identifier");
|
||||||
|
|
||||||
// keywords which can be followed by regular expressions
|
// keywords which can be followed by regular expressions
|
||||||
|
|
@ -256,7 +255,7 @@ var JavaScriptHighlightRules = function() {
|
||||||
}, {
|
}, {
|
||||||
// invalid operators
|
// invalid operators
|
||||||
token : "invalid",
|
token : "invalid",
|
||||||
regex: /\{\d+,?(?:\d+)?}[+*]|[+*^$?][+*]|\?\?/ // |[^$][?]
|
regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
||||||
}, {
|
}, {
|
||||||
// operators
|
// operators
|
||||||
token : "constant.language.escape",
|
token : "constant.language.escape",
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,9 @@ var TextMode = require("./text").Mode;
|
||||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||||
var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules;
|
var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules;
|
||||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||||
var Range = require("../range").Range;
|
|
||||||
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
||||||
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
||||||
|
|
||||||
|
|
||||||
var JavaScriptMode = require("./javascript").Mode;
|
|
||||||
var CssMode = require("./css").Mode;
|
|
||||||
|
|
||||||
var Mode = function() {
|
var Mode = function() {
|
||||||
var highlighter = new JspHighlightRules();
|
var highlighter = new JspHighlightRules();
|
||||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue