Skip to content

Commit

Permalink
Merge pull request #5079 from whazor/include_self
Browse files Browse the repository at this point in the history
Support TM include: $self
  • Loading branch information
akoreman authored Mar 7, 2023
2 parents 0336135 + a4f1f3f commit e0d4ea9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/mode/_test/tokens_mel.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,25 @@
["storage.type.mel"," "],
["entity.name.function.mel","animatedDuplication"],
["punctuation.section.function.mel"," ("],
["meta.function.mel","int $rangeStart, int $rangeEnd, int $numOfDuplicates, int $duplicateOrInstance"],
["storage.type.mel","int"],
["meta.function.mel"," "],
["variable.other.mel","$"],
["punctuation.definition.variable.mel","rangeStart"],
["meta.function.mel",", "],
["storage.type.mel","int"],
["meta.function.mel"," "],
["variable.other.mel","$"],
["punctuation.definition.variable.mel","rangeEnd"],
["meta.function.mel",", "],
["storage.type.mel","int"],
["meta.function.mel"," "],
["variable.other.mel","$"],
["punctuation.definition.variable.mel","numOfDuplicates"],
["meta.function.mel",", "],
["storage.type.mel","int"],
["meta.function.mel"," "],
["variable.other.mel","$"],
["punctuation.definition.variable.mel","duplicateOrInstance"],
["punctuation.section.function.mel",")"]
],[
"start",
Expand Down
2 changes: 2 additions & 0 deletions src/mode/text_highlight_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ var TextHighlightRules = function() {
}
var includeName = typeof rule == "string" ? rule : rule.include;
if (includeName) {
if (includeName === "$self")
includeName = "start";
if (Array.isArray(includeName))
toInsert = includeName.map(function(x) { return rules[x]; });
else
Expand Down

0 comments on commit e0d4ea9

Please sign in to comment.