Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix highlighting of end in end match #51

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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