Add @ as an escape for usage in other languages
For example to use in Minted
This commit is contained in:
parent
e2134fee64
commit
3080d3bd6c
18
minizinc.iro
18
minizinc.iro
@ -51,6 +51,13 @@ styles [] {
|
|||||||
pygments_scope = String.Escape
|
pygments_scope = String.Escape
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.escaped : style {
|
||||||
|
color = brown
|
||||||
|
ace_scope = text
|
||||||
|
textmate_scope = text
|
||||||
|
pygments_scope = Generic.Inserted
|
||||||
|
}
|
||||||
|
|
||||||
.function : style {
|
.function : style {
|
||||||
color = green
|
color = green
|
||||||
ace_scope = entity.name.function
|
ace_scope = entity.name.function
|
||||||
@ -146,6 +153,17 @@ main : context {
|
|||||||
styles [] = .comment;
|
styles [] = .comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Escape to non-MiniZinc code or comments
|
||||||
|
: inline_push {
|
||||||
|
regex \= (@)
|
||||||
|
styles [] = .escaped;
|
||||||
|
default_style = .escaped
|
||||||
|
: pop {
|
||||||
|
regex \= (@)
|
||||||
|
styles [] = .escaped;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
## Literal Patterns
|
## Literal Patterns
|
||||||
#######################################
|
#######################################
|
||||||
|
Reference in New Issue
Block a user