Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{ "name": "Tamarin",
"scopeName": "tamarin",
"foldingStartMarker": "(?x)\n\t\t /\\*\\*(?!\\*)\n\t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\t",
"foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
"fileTypes": ["spthy"],
"uuid": "1239d91b-3144-40ed-a1a4-b359115b83d5",
"patterns": [
{ "name": "comment.tamarin",
"begin": "//",
"end": "\\Z"
},
{ "name": "comment.tamarin",
"begin": "dnl",
"end": "\\Z"
},
{ "name": "comment.tamarin",
"begin": "/\\*",
"end": "\\*/"
},
{ "name": "string.tamarin",
"begin": "'",
"end": "'"
},
{ "name": "variable.tamarin",
"begin": "#(define|include)\\s+([A-Za-z0-9_]*)",
"beginCaptures": {
"1": { "name": "keyword.tamarin" },
"2": { "name": "support.constant.tamarin"}
},
"patterns": [
{ "include": "$self" },
{ "name": "tamarin",
"match": "."
}
],
"end": "\\Z",
"comment": "Defines and includes colouring"
},
{ "name": "plain.tamarin",
"begin": "#(ifdef|ifndef|else|elif|endif)\\s*([A-Za-z0-9_]*)",
"beginCaptures": {
"1": { "name": "storage.tamarin" },
"2": { "name": "constant.character.tamarin"}
},
"end": "\\Z",
"comment": "if/else colouring"
},
{ "name": "plain.tamarin",
"begin": "(define|pushdef)\\(<!([A-Za-z0-9_]*)!>,",
"beginCaptures": {
"1": { "name": "storage.tamarin" },
"2": { "name": "constant.character.tamarin"}
},
"end": "\\)\\Z",
"patterns": [
{ "include": "$self" },
{ "name": "tamarin",
"match": "."
}
],
"comment": "m4 defines"
},
{ "name": "support.function.tamarin",
"match": "\\b(aenc|sdec|senc|sdec|sign|verify|hashing|signing)\\b",
"comment": "Tamarin constr keywords"
},
{ "name": "constant.language.tamarin",
"match": "\\b(in|let|begin|end)\\b",
"comment": "Tamarin decl keywords"
},
{ "name": "keyword.control.tamarin",
"match": "\\b(axiom|lemma|equations|functions|builtins|protocol|property|subsection|section|text|theory)\\b"
},
{ "match": "([@$~#]|@\\s)([A-Za-z][A-Za-z0-9_]*)",
"name": "variable.other.tamarin",
"captures": {
//"1": {"name": "keyword.control.tamarin"},
"2": { "name": "variable.tamarin" }
},
"comment": "Special variables"
},
{ "name": "constant.language.tamarin",
"match": "(\\b(F|T|All|Ex|not|)\\b|&|\\||==>)",
"comment": "Tamarin logical operations"
},
{ "name": "plain.tamarin",
"begin": "(!*\\b[A-Za-z0-9_]*)\\(",
"beginCaptures": {
"1": { "name": "entity.name.function.tamarin" }
},
"end": "\\)",
"patterns": [
{ "include": "$self" },
{ "name": "tamarin",
"match": "."
}
],
"comment": "Facts grouped as a function"
},
{ "name": "support.function.tamarin",
"match": "\\b(rule)\\b",
"comment": "Highlight rule"
},
{ "name": "plain.tamarin",
"begin": "(<!)",
"beginCaptures": {
"1": { "name": "string.tamarin" }
},
"end": "(!>)",
"endCaptures": {
"1": { "name": "string.tamarin" }
},
"patterns": [
{ "include": "$self" },
{ "name": "tamarin",
"match": "."
}
],
"comment": "Facts grouped as a function"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment