Removed useless rules, added support for do() syntax
This commit is contained in:
parent
d57e010ca3
commit
a519520ae7
2 changed files with 8 additions and 18 deletions
|
|
@ -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"
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue