-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsnippets.json
27 lines (27 loc) · 1.41 KB
/
snippets.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"SAPFOR Inline Function Call": {
"prefix": "#pragma spf transform inline",
"body": [ "#pragma spf transform inline${TM_SELECTED_TEXT/([\\s\\S]+)/\n{\n$1\n}/}" ],
"description": "Inline function call"
},
"SAPFOR Propagate Expression": {
"prefix": "#pragma spf transform propagate",
"body": [ "#pragma spf transform propagate${TM_SELECTED_TEXT/([\\s\\S]+)/\n{\n$1\n}/}" ],
"description": "Propagate specified expressions or propagate expressions in a whole scope."
},
"SAPFOR Rename Local": {
"prefix": "#pragma spf transform rename",
"body": [ "#pragma spf transform rename${TM_SELECTED_TEXT/([\\s\\S]+)/\n{\n$1\n}/}" ],
"description": "Rename local variables in a scope. Each variable will have unique name in the scope."
},
"SAPFOR Replace Structure": {
"prefix": "#pragma spf transform replace",
"body": [ "#pragma spf transform replace${1/^[a-z|A-Z].*$/($0)/}${2/[a-z|A-Z]/ with($0)/}${3: nostrict}" ],
"description": "Replace arguments of a structure type with references to members:\n\nFrom:\n struct STy { int X };\n void foo(struct STy *S) {\n S->X = 5;\n #pragma spf transform replace(S)\n }\nTo:\n void foo(int *S_X0) {\n *S_X0 = 5\n }\n"
},
"SAPFOR Assert": {
"prefix": "#pragma spf assert",
"body": [ "#pragma spf assert ${1|nomacro|} ${TM_SELECTED_TEXT/([\\s\\S]+)/\n{\n$1\n}/}" ],
"description": "Check specified properties in a scope."
}
}