Skip to content

Commit

Permalink
Add guard (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
phannebohm authored Aug 5, 2024
1 parent 1c2684b commit 79a6bc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion syntaxes/metamodelica.tmGrammar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ patterns:
name: string.quoted.double

# Keywords
- match: \b(for|if|when|while|in|then|loop|end if|end when|end for|end while|else|elsewhen|break|return|each|elseif|input|output)\b
- match: \b(for|if|when|while|in|then|loop|guard|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
Expand Down
5 changes: 3 additions & 2 deletions test/metamodelica/Function.test.mo
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ algorithm
// ^^^^^ keyword.control
Real yi;
// ^^^^ source.metamodelica storage.type
case {} algorithm
case {} guard true algorithm
// ^^^^ keyword.control
// ^^^^^^^^^ source.metamodelica keyword
// ^^^^^ keyword.control
// ^^^^^^^^^ source.metamodelica keyword
Error.addMessage(Error.INTERNAL_ERROR, {getInstanceName() + " failed."});
// ^^^^^^^^^^^^^^^^ source.metamodelica entity.name.function
// ^^^^^^^^^^^^^^^ source.metamodelica support.function.special
Expand Down

0 comments on commit 79a6bc3

Please sign in to comment.