Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion syntaxes/brightscript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
{
"include": "#keyword_logical_operator"
},
{
"include": "#keyword_modifier"
Comment thread
sethmaclean marked this conversation as resolved.
Outdated
},
{
"include": "#keyword_return"
},
Expand Down Expand Up @@ -649,6 +652,16 @@
"match": "(?i:\\b(and|or|not)\\b)",
"name": "keyword.operator.logical.word"
},
"keyword_modifier": {
"comment": "Capture modifiers that alter the declaration of a type of variable.",
"match": "(?i:\\b(optional)\\b)",
"name": "keyword.modifier.word",
"captures": {
"1": {
"name": "keyword.modifier.brs"
}
}
},
"keyword_return": {
"comment": "The return statements in functions",
"captures": {
Expand Down Expand Up @@ -771,6 +784,9 @@
},
{
"include": "#interface_field"
},
{
"include": "#keyword_modifier"
}
],
"end": "(?i)[\\s\\t]*(end[\\s\\t]*interface)",
Expand All @@ -781,7 +797,7 @@
}
},
"interface_field": {
"begin": "(?i)\\s*\\b([a-z0-9_]+)(?:[\\s\\t]*(as))?",
"begin": "(?i)\\s*\\b([a-z0-9_]+)(?:[\\s\\t]*(as))",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want to add optional in this regex as an additional optional capture group rather than capturing it as its unique named item.

"beginCaptures": {
"1": {
"name": "variable.object.property.brs"
Expand Down