Skip to content

Commit

Permalink
Fix highlighting of end in end match (#51)
Browse files Browse the repository at this point in the history
Change scope of 'end match', 'end if', 'end for' from 'keyword' to 'keyword.control'
  • Loading branch information
phannebohm authored Apr 22, 2024
1 parent e68c72c commit 1136a1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions syntaxes/metamodelica.tmGrammar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ patterns:
# Keywords
- match: \b(for|if|when|while|then|loop|end if|end when|end for|end while|else|elsewhen|break|return|each|elseif|input|output)\b
name: keyword.control
- match: \b(matchcontinue|match|local|case|try|end matchcontinue|end match|end try)\b
name: keyword.control
- match: \b(and|or|not)\b
name: keyword.control
- match: <|<\=|>|>\=|\=\=|<>
Expand All @@ -72,8 +74,6 @@ patterns:
name: keyword.operator.assignment
- match: \b(algorithm|equation|protected|public|end|external|in|encapsulated)\b
name: keyword
- match: \b(matchcontinue|match|local|case|try|end matchcontinue|end match|end try)\b
name: keyword.control

# Support
- match: \b(acos|asin|atan|atan2|cos|cosh|exp|log|log10|sin|sinh|tan|tanh|abs|sign|sqrt|max|min|product|sum)\b
Expand Down
2 changes: 1 addition & 1 deletion test/metamodelica/Function.test.mo
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ algorithm
then ();
// ^^^^ source.metamodelica keyword.control
end match;
//^^^ source.metamodelica keyword
//^^^ source.metamodelica keyword.control
// ^^^^ source.metamodelica keyword.control
end myMetaModelicaFunction;
//<--- source.metamodelica keyword
Expand Down

0 comments on commit 1136a1e

Please sign in to comment.