1+ name : Tamarin
2+ file_extensions :
3+ - spthy
4+ scope : source.spthy
5+ fileTypes : [YAML-tmLanguage]
6+ scopeName : source.yaml-tmlanguage
7+ uuid : a6b019cb-75bf-4d9a-aab1-703f6b6d143b
8+
9+ foldingStartMarker : " (?x)\n\t\t /\\ *\\ *(?!\\ *)\n\t\t |^(?![^{]*?//|[^{]*?/\\ *(?!.*?\\ */.*?\\ {)).*?\\ {\\ s*($|//|/\\ *(?!.*?\\ */.*\\ S))\n\t "
10+ foldingStopMarker : " (?<!\\ *)\\ *\\ */|^\\ s*\\ }"
11+
12+ contexts :
13+ main :
14+ - include : comments
15+ - include : comments-inline
16+
17+ - match : ' "'
18+ scope : punctuation.definition.string.begin.spthy
19+
20+ - match : \b(equations|functions|builtins|protocol|property|theory|begin|end|subsection|section|text|rule|pb|lts|exists-trace|all-traces|enable|assertions|modulo|default_rules|anb-proto|in|let|Fresh|fresh|Public|public)\b
21+ scope : keyword.function.spthy
22+
23+ - match : ' {\||\|}|{|}|\.\.|:|@|#|<-|<->|\!=|<=|>=|--\[|\]->|\[|\]|-->'
24+ scope : keyword.operator.spthy
25+
26+
27+ # Numbers
28+ - match : ' \b(-)?[0-9.]+\b'
29+ scope : constant.numeric.spthy
30+
31+ # Brackets
32+ - match : \(
33+ push : brackets
34+ - match : \)
35+ scope : invalid.illegal.stray-bracket-end
36+
37+ - match : " \\ b(aenc|adec|senc|sdec|sign|verify|Eq|eq|hashing|signing|revealing-signing|diffie-hellman|symmetric-encryption|asymmetric-encryption|multiset|bilinear-pairing|h|H|sk|pk|Fr|In|Out|IN|OUT)\\ b"
38+ scope : variable.language.spthy
39+ comment : Tamarin constr keywords
40+
41+ - match : " \\ b(in|let|begin|end)\\ b"
42+ scope : constant.language.spthy
43+ comment : Tamarin decl keywords
44+
45+ - match : " \\ b(axiom|restriction|lemma|sources|use_induction|reuse|hide_lemma|left|right|builtins|protocol|property|subsection|section|text|theory)\\ b"
46+ scope : keyword.control.spthy
47+
48+
49+ - match : " (\\ b(F|T|All|Ex|not|)\\ b|&|\\ ||==>|=|==|<|>)"
50+ scope : constant.language.spthy
51+ comment : Tamarin logical operations
52+
53+ - match : " '"
54+ captures :
55+ 0 : punctuation.definition.string.begin.spthy
56+ push :
57+ - meta_scope : string.quoted.single.spthy
58+ - match : " '"
59+ captures :
60+ 0 : punctuation.definition.string.end.spthy
61+ pop : true
62+
63+ - match : \w+\s*(?=\()
64+ scope : support.function.spthy
65+
66+
67+ comments :
68+ - match : /\*\*/
69+ scope : comment.block.empty.spthy punctuation.definition.comment.spthy
70+ - include : comments-inline
71+ comments-inline :
72+ - match : /\*
73+ scope : punctuation.definition.comment.spthy
74+ push :
75+ - meta_scope : comment.block.spthy
76+ - match : \*/
77+ scope : punctuation.definition.comment.spthy
78+ pop : true
79+ - match : \s*((//).*$\n?)
80+ captures :
81+ 1 : comment.line.double-slash.spthy
82+ 2 : punctuation.definition.comment.spthy
83+
84+ brackets :
85+ - match : \)
86+ pop : true
87+ - include : main
0 commit comments