Removed useless rules, added support for do() syntax

This commit is contained in:
baboso 2014-06-04 18:03:55 -04:00
commit a519520ae7
2 changed files with 8 additions and 18 deletions

View file

@ -15,8 +15,6 @@ var PraatHighlightRules = function() {
"assert"
);
// var buildinConstants = ("ARGV|ENV|INC|SIG");
var predefinedVariables = (
"macintosh|windows|unix|" +
"praatVersion|praatVersion\\$" +
@ -91,18 +89,6 @@ var PraatHighlightRules = function() {
"ResultsMFC|EEG|ERPTier|ERP|KNN|FeatureWeights"
);
var keywordMapper = this.createKeywordMapper({
"keyword": keywords,
// "constant.language": buildinConstants,
"support.function": functions
}, "identifier");
var inlineIf = this.createKeywordMapper({
"keyword": "(if|then|else|fi)",
// "constant.language": buildinConstants,
"support.function": functions
}, "identifier");
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
@ -120,6 +106,9 @@ var PraatHighlightRules = function() {
}, {
token : ["text", "keyword", "text", "keyword"],
regex : /^(\s*)(?:(demo)(\s+))?(10|12|14|16|24)$/
}, {
token : ["text", "support.function", "text"],
regex : /(\s*)(do\$?)(\s*:\s*|\s*\(\s*)/
}, {
// Is this rule necessary?
// token : ["text", "keyword"],
@ -151,7 +140,7 @@ var PraatHighlightRules = function() {
regex : /"[^"]*$/,
next : "brokenstring"
}, {
token : ["text", "keyword", "text", "entity.name.section"], // multi line string start
token : ["text", "keyword", "text", "entity.name.section"],
regex : /(^\s*)(\bform\b)(\s+)(.*)/,
next : "form"
}, {