-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippets.json
60 lines (53 loc) · 2.52 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"transition (snippet)": {
"prefix": "transition",
"body": [
"transition transitionName(param_1: type_1)\n(* statements go below *)\n\t$1\nend",
"$2"
],
"description": "create a transition"
},
"fun (snippet)": {
"prefix": "fun",
"body": [
"fun (input_1 : type_1) => \n\t(* expression goes here *)\n\t$1",
"$2"
],
"description": "create a function"
},
"match (snippet)": {
"prefix": "match",
"body": [
"match param_1 with\n\t| True =>\n\t(*statements for true*)\n\t$1\n\t| False =>\n \t(*statements for False*)\n end",
"$2"
],
"description": "create a pattern match"
},
"field (snippet)": {
"prefix": "field",
"body": [
"field variable_1 : type_1 = '$1' ",
"$2"
],
"description": "create field (mutable variable)"
},
"let (snippet)": {
"prefix": "field",
"body": [
"let variable_1 = '$1' ",
"$2"
],
"description": "binding variables"
},
"scilla (snippet)": {
"prefix": "scilla",
"body": ["(***************************************************)\n(* Scilla version *)\n(***************************************************)\n\nscilla_version 0\n\n(***************************************************)\n(* Associated library *)\n(***************************************************)\n\nlibrary MyContractLib\n\n\n(* Library code block follows *)\n\n\n\n(***************************************************)\n(* Contract definition *)\n(***************************************************)\n\ncontract MyContract\n\n(* Immutable fields declaration *)\n\n(vname_1 : vtype_1,\n vname_2 : vtype_2)\n\n(* Mutable fields declaration *)\n\nfield vname_1 : vtype_1 = init_val_1\nfield vname_2 : vtype_2 = init_val_2\n\n(* Transitions *)\n\n\n(* Transition signature *)\ntransition firstTransition (param_1 : type_1, param_2 : type_2)\n (* Transition body *)\n\nend\n\ntransition secondTransition (param_1: type_1)\n (* Transition body *)\n\nend","$2"],
"description": "create a new scilla contract"
},
"procedure (snippet)":{
"prefix": "procedure",
"body":[ "procedure procedureName(param_1: type_1)\n(* statements go below *)\n\t$1\nend",
"$2"],
"description": "Create a procedure\n"
}
}