From 1d5fbb32e0902929aeb71eaf3171615604ef4c4f Mon Sep 17 00:00:00 2001 From: phannebohm Date: Thu, 4 Jul 2024 14:15:50 +0200 Subject: [PATCH] Fix `in` in for statement (#54) --- syntaxes/metamodelica.tmGrammar.yaml | 4 ++-- test/metamodelica/Function.test.mo | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/syntaxes/metamodelica.tmGrammar.yaml b/syntaxes/metamodelica.tmGrammar.yaml index 5c5dcd4..ba37626 100644 --- a/syntaxes/metamodelica.tmGrammar.yaml +++ b/syntaxes/metamodelica.tmGrammar.yaml @@ -60,7 +60,7 @@ patterns: name: string.quoted.double # 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 + - 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 name: keyword.control - match: \b(matchcontinue|match|local|case|try|end matchcontinue|end match|end try)\b name: keyword.control @@ -72,7 +72,7 @@ patterns: name: keyword.operator.arithmetic - match: \=|\:\= name: keyword.operator.assignment - - match: \b(algorithm|equation|protected|public|end|external|in|encapsulated)\b + - match: \b(algorithm|equation|protected|public|end|external|encapsulated)\b name: keyword # Support diff --git a/test/metamodelica/Function.test.mo b/test/metamodelica/Function.test.mo index 3980cc3..747b54a 100644 --- a/test/metamodelica/Function.test.mo +++ b/test/metamodelica/Function.test.mo @@ -33,7 +33,7 @@ algorithm // ^^^^^^^^^ source.metamodelica keyword for xi in x loop // ^^^ source.metamodelica keyword.control -// ^^ source.metamodelica keyword +// ^^ source.metamodelica keyword.control // ^^^^ source.metamodelica keyword.control y := xi::y; // ^^ source.metamodelica keyword.operator.assignment