Skip to content

Commit

Permalink
Fix comment highlights in array/dict literals and function arguments
Browse files Browse the repository at this point in the history
Fixes #178
  • Loading branch information
tristan957 committed Nov 6, 2023
1 parent 3b528ed commit f2b7a13
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions syntaxes/meson.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@
"fileTypes": ["meson.build", "meson_options.txt", "meson.options"],
"patterns": [
{
"begin": "(\\#)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.comment.meson"
}
},
"end": "$",
"name": "comment.line.number-sign.meson"
"include": "#comment"
},
{
"match": "\\\\$",
Expand Down Expand Up @@ -60,6 +53,9 @@
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#expression"
}
Expand All @@ -83,6 +79,16 @@
"match": "\\b(build_machine|host_machine|meson|target_machine)\\b",
"name": "support.constant.meson variable.language.meson"
},
"comment": {
"begin": "(\\#)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.comment.meson"
}
},
"end": "$",
"name": "comment.line.number-sign.meson"
},
"conditional_expression": {
"begin": "(\\?)",
"beginCaptures": {
Expand Down Expand Up @@ -120,6 +126,9 @@
}
},
"patterns": [
{
"include": "#comment"
},
{
"name": "punctuation.separator.dictionary.meson",
"match": ":"
Expand Down Expand Up @@ -244,6 +253,9 @@
},
"contentName": "meta.function-call.arguments.meson",
"patterns": [
{
"include": "#comment"
},
{
"name": "punctuation.separator.arguments.meson",
"match": "(,)"
Expand Down

0 comments on commit f2b7a13

Please sign in to comment.