From 635da1f2ea5c37ef9ca69bb3bf134921510c9db8 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 17 Apr 2013 16:12:44 +0400 Subject: [PATCH] temporary workaround for tokenizer not working for rules ending with $ --- lib/ace/mode/actionscript_highlight_rules.js | 4 ++-- lib/ace/mode/clojure_highlight_rules.js | 2 +- lib/ace/mode/erlang_highlight_rules.js | 4 ++-- lib/ace/mode/haskell_highlight_rules.js | 4 ++-- lib/ace/mode/ini_highlight_rules.js | 8 ++++---- lib/ace/mode/pascal_highlight_rules.js | 8 ++++---- lib/ace/mode/rust_highlight_rules.js | 8 ++++---- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/ace/mode/actionscript_highlight_rules.js b/lib/ace/mode/actionscript_highlight_rules.js index 52a80391..1f30d9c2 100644 --- a/lib/ace/mode/actionscript_highlight_rules.js +++ b/lib/ace/mode/actionscript_highlight_rules.js @@ -87,8 +87,8 @@ var ActionScriptHighlightRules = function() { next: 'pop' }, { defaultToken: 'comment.block.actionscript.2' } ] }, { token: 'punctuation.definition.comment.actionscript.2', - regex: '//', - push: + regex: '//.*$', + push_: [ { token: 'comment.line.double-slash.actionscript.2', regex: '$', next: 'pop' }, diff --git a/lib/ace/mode/clojure_highlight_rules.js b/lib/ace/mode/clojure_highlight_rules.js index 08d64425..cd0e38ca 100644 --- a/lib/ace/mode/clojure_highlight_rules.js +++ b/lib/ace/mode/clojure_highlight_rules.js @@ -170,7 +170,7 @@ var ClojureHighlightRules = function() { regex : '"', next: "string" }, { - token : "string", // symbol + token : "constant", // symbol regex : /:[\w*+!\-_?:\/]+/ }, { token : "string.regexp", //Regular Expressions diff --git a/lib/ace/mode/erlang_highlight_rules.js b/lib/ace/mode/erlang_highlight_rules.js index c225431c..5ee7bfb5 100644 --- a/lib/ace/mode/erlang_highlight_rules.js +++ b/lib/ace/mode/erlang_highlight_rules.js @@ -119,8 +119,8 @@ var ErlangHighlightRules = function() { { token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ], '#comment': [ { token: 'punctuation.definition.comment.erlang', - regex: '%', - push: + regex: '%.*$', + push_: [ { token: 'comment.line.percentage.erlang', regex: '$', next: 'pop' }, diff --git a/lib/ace/mode/haskell_highlight_rules.js b/lib/ace/mode/haskell_highlight_rules.js index 9ecf68ad..fdfaa53e 100644 --- a/lib/ace/mode/haskell_highlight_rules.js +++ b/lib/ace/mode/haskell_highlight_rules.js @@ -171,8 +171,8 @@ var HaskellHighlightRules = function() { { defaultToken: 'comment.block.haskell' } ] } ], '#comments': [ { token: 'punctuation.definition.comment.haskell', - regex: '--', - push: + regex: '--.*', + push_: [ { token: 'comment.line.double-dash.haskell', regex: '$', next: 'pop' }, diff --git a/lib/ace/mode/ini_highlight_rules.js b/lib/ace/mode/ini_highlight_rules.js index 75d28c4f..b4c152a4 100644 --- a/lib/ace/mode/ini_highlight_rules.js +++ b/lib/ace/mode/ini_highlight_rules.js @@ -46,15 +46,15 @@ var IniHighlightRules = function() { this.$rules = { start: [ { token: 'punctuation.definition.comment.ini', - regex: '#', - push: + regex: '#.*', + push_: [ { token: 'comment.line.number-sign.ini', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.number-sign.ini' } ] }, { token: 'punctuation.definition.comment.ini', - regex: ';', - push: + regex: ';.*', + push_: [ { token: 'comment.line.semicolon.ini', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.semicolon.ini' } ] }, { token: diff --git a/lib/ace/mode/pascal_highlight_rules.js b/lib/ace/mode/pascal_highlight_rules.js index 527bc1a8..ac8a4180 100644 --- a/lib/ace/mode/pascal_highlight_rules.js +++ b/lib/ace/mode/pascal_highlight_rules.js @@ -69,15 +69,15 @@ var PascalHighlightRules = function() { { token: 'constant.numeric.pascal', 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|ll|LL|ull|ULL)?\\b' }, { token: 'punctuation.definition.comment.pascal', - regex: '--', - push: + regex: '--.*$', + push_: [ { token: 'comment.line.double-dash.pascal.one', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.double-dash.pascal.one' } ] }, { token: 'punctuation.definition.comment.pascal', - regex: '//', - push: + regex: '//.*$', + push_: [ { token: 'comment.line.double-slash.pascal.two', regex: '$', next: 'pop' }, diff --git a/lib/ace/mode/rust_highlight_rules.js b/lib/ace/mode/rust_highlight_rules.js index 817cb65e..acb6c92a 100644 --- a/lib/ace/mode/rust_highlight_rules.js +++ b/lib/ace/mode/rust_highlight_rules.js @@ -89,15 +89,15 @@ var RustHighlightRules = function() { { token: 'constant.numeric.float.source.rust', regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' }, { token: 'comment.line.documentation.source.rust', - regex: '//!', - push: + regex: '//!.*$', + push_: [ { token: 'comment.line.documentation.source.rust', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.documentation.source.rust' } ] }, { token: 'comment.line.double-dash.source.rust', - regex: '//', - push: + regex: '//.*$', + push_: [ { token: 'comment.line.double-dash.source.rust', regex: '$', next: 'pop' },