From 3080d3bd6c06aefd96eb9ae44978edbf12bf0407 Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Tue, 3 Dec 2019 12:07:02 +1100 Subject: [PATCH] Add @ as an escape for usage in other languages For example to use in Minted --- minizinc.iro | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/minizinc.iro b/minizinc.iro index 46e2d17..fc49a9a 100644 --- a/minizinc.iro +++ b/minizinc.iro @@ -51,6 +51,13 @@ styles [] { pygments_scope = String.Escape } + .escaped : style { + color = brown + ace_scope = text + textmate_scope = text + pygments_scope = Generic.Inserted + } + .function : style { color = green ace_scope = entity.name.function @@ -146,6 +153,17 @@ main : context { styles [] = .comment; } + # Escape to non-MiniZinc code or comments + : inline_push { + regex \= (@) + styles [] = .escaped; + default_style = .escaped + : pop { + regex \= (@) + styles [] = .escaped; + } + } + ####################################### ## Literal Patterns #######################################