-
Notifications
You must be signed in to change notification settings - Fork 0
/
ada-snippets.json
341 lines (341 loc) · 10.9 KB
/
ada-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
{
"Accept Statement": {
"prefix": "accept",
"scope": "ada",
"body": [
"accept ${1:Name} do",
" $0",
"end ${1:Name};"
],
"description": "Accept Statement"
},
"Access Type Definition": {
"prefix": "access",
"scope": "ada",
"body": [
"type ${1:Name} is ${2|access,access all,access constant|} of ${3:Some_Type};"
],
"description": "Access Type Definition"
},
"Array Type Definition": {
"prefix": "array",
"scope": "ada",
"body": [
"type ${1:Name} is array($2) of ${3:Element_Type};"
],
"description": "Array Type Definition"
},
"Aspect Specification": {
"prefix": "aspect",
"scope": "ada",
"body": [
"with ${1|Ada_2005,Ada_2012,Address,Alignment,All_Calls_Remote,Asynchronous,Atomic,Atomic_Components,Attach_Handler,Bit_Order,Component_Size,Constant_Indexing,Convention,CPU,Default_Component_Value,Default_Iterator,Default_Storage_Pool,Default_Value,Dispatching_Domain,Dynamic_Predicate,Elaborate_Body,Export,External_Name,External_Tag,Favor_Top_Level,Implicit_Dereference,Import,Independent,Independent_Components,Inline,Inline_Always,Input,Interrupt_Handler,Interrupt_Priority,Iterator_Element,Link_Name,Machine_Radix,No_Return,Object_Size,Output,Pack,Persistent_BSS,Post,Pre,Preelaborate,Priority,Pure,Pure_Function,Read,Relative_Deadline,Remote_Access_Type,Remote_Call_Interface,Remote_Types,Shared,Shared_Passive,Size,Small,Static_Predicate,Storage_Pool,Storage_Size,Stream_Size,Suppress_Debug_Info,Synchronization,Test_Case,Type_Invariant,Unchecked_Union,Universal_Aliasing,Unmodified,Unreferenced,Unreferenced_Objects,Value_Size,Variable_Indexing,Volatile,Volatile_Components,Warnings,Write|}"
],
"description": "Aspect Specification"
},
"Case Statement": {
"prefix": "case",
"scope": "ada",
"body": [
"case ${1:Variable} is",
" $0",
"end case;"
],
"description": "Case Statement"
},
"Extended Return Statement": {
"prefix": "return",
"body": [
"return ${1:Result} : $2 do",
" $0",
"end return;"
],
"description": "Extended Return Statement"
},
"Declare Statement": {
"prefix": "declare",
"body": [
"declare",
" $1",
"begin",
" $0",
"end;"
],
"description": "Declare Statement"
},
"Elsif Statement": {
"prefix": "elsif",
"scope": "ada",
"body": [
"elsif ${1:Condition} then",
" $0"
],
"description": "Elsif Statement"
},
"Entry Spec": {
"prefix": "entry-spec",
"scope": "ada",
"body": [
"entry ${1:Name};"
],
"description": "Entry Specification"
},
"Entry Body": {
"prefix": "entry-body",
"scope": "ada",
"body": [
"entry ${1:Name} when ${2:Guard_Condition} is",
" $3",
"begin",
" $0",
"end ${1:Name};"
],
"description": "Entry Body"
},
"Enumeration Type Definition": {
"prefix": "enumeration",
"scope": "ada",
"body": [
"type ${1:Name} is ($0);"
],
"description": "Enumeration Type Definition"
},
"Exit": {
"prefix": "exit",
"scope":"ada",
"body": [
"exit ${1:Loop Name};"
],
"description": "Exit statement"
},
"Exit When": {
"prefix": "exit-when",
"scope": "ada",
"body": [
"exit ${1:Loop Name} when ${2:Condition};"
],
"description": "Exit when statement"
},
"For Loop Statement": {
"prefix": "for",
"body": [
"for ${1:J} ${2|in,in reverse,of,of reverse|} loop",
" $0",
"end loop;"
],
"description": "For Loop Statement"
},
"Function Declaration": {
"prefix": "function",
"body": [
"${1|function,overriding function,not overriding function|} ${2:Name} ($3) return ${4:Return_Type}${5|;, is abstract;, is ();, renames |}"
],
"description": "Function Declaration"
},
"Function Body": {
"prefix": "function",
"body": [
"${1|function,overriding function,not overriding function|} ${2:Name} ($3) return ${4:Return_Type} is",
" $5",
"begin",
" $0",
"end ${2:Name};"
],
"description": "Function Body"
},
"Generic Formal Part": {
"prefix": "generic",
"scope": "ada",
"body": [
"generic",
" $1",
"$0"
],
"description": "Generic Formal Part"
},
"If Statement": {
"prefix": "if",
"scope": "ada",
"body": [
"if ${1:Condition} then",
" $0",
"end if;"
],
"description": "If Statement"
},
"Interface Type Definition": {
"prefix": "interface",
"scope": "ada",
"body": [
"type ${1:Name} is ${2|interface,limited interface,synchronized interface,task interface,protected interface|};"
],
"description": "Interface Type Definition"
},
"Loop Statement": {
"prefix": "loop",
"scope": "ada",
"body": [
"loop",
" $0",
"end loop;"
],
"description": "Loop Statement"
},
"Operator Declaration": {
"prefix": "operator",
"scope": "ada",
"body": [
"function \"${1|and,or,xor,=,<,<=,>,>=,+,-,&,*,/,mod,rem,**,not,abs|}\"($2) return ${3:Return_Type};"
],
"description": "Operator Declaration"
},
"Operator Body": {
"prefix": "operator",
"scope": "ada",
"body": [
"function \"${1|and,or,xor,=,<,<=,>,>=,+,-,&,*,/,mod,rem,**,not,abs|}\"($2) return ${3:Return_Type} is",
" $2",
"begin",
" $0",
"end ${1:Name};"
],
"description": "Operator Body"
},
"Package Declaration or Body": {
"prefix": "package",
"body": [
"${1|package,package body|} ${2:Name} is",
" ${3|pragma Preelaborate;,pragma Pure;|}$0",
"private",
"end ${2:Name};"
],
"description": "Package Declaration or Body"
},
"Pragma Directive": {
"prefix": "pragma",
"scope": "ada",
"body": [
"pragma ${1|Abort_Defer,Ada_83,Ada_95,Ada_2005,Ada_2012,All_Calls_Remote,Annotate,Assert,Assertion_Policy,Assume_No_Invalid_Values,Ast_Entry,Canonical_Streams,Check,Check_Name,Check_Policy,Comment,Common_Object,Compile_Time_Error,Compile_Time_Warning,Complete_Representation,Complex_Representation,Component_Alignment,Convention_Identifier,CPP_Class,CPP_Constructor,CPP_Virtual,CPP_VTable,CPU,C_Pass_By_Copy,Debug,Debug_Policy,Default_Storage_Pool,Detect_Blocking,Discard_Names,Dispatching_Domain,Elaborate,Elaborate_All,Elaborate_Body,Elaboration_Checks,Eliminate,Export_Exception,Export_Function,Export_Object,Export_PRocedure,Export_Value,Export_Valued_Procedure,Extend_System,Extensions_Allowed,External,External_Name_Casing,Fast_Math,Favor_Top_Level,Finalize_Storage_Only,Float_Representation,Ident,Implemented,Implicit_Packing,Import_Exception,Import_Function,Import_Object,Import_Procedure,Import_Valued_Procedure,Independent,Independent_Component,Initialize_Scalars,Inline_Always,Inline_Generic,Inspection_Point,Interface_Name,Interrupt_State,Invariant,Keep_Names,License,Linker_Alias,Linker_Constructor,Linker_Destructor,Linker_Options,Linker_Section,Link_With,List,Locking_Policy,Long_Float,Machine_Attribute,Main,Main_Storage,Normalize_Scalars,No_Body,No_StricT_Aliasing,Obsolescent,Optimize,Optimize_Alignment,Ordered,Page,Partition_Elaboration_Policy,Passive,Persistent_BSS,Polling,Postcondition,Precondition,Preelaborate,Priority_Specific_Dispatching,Profile,Profile_Warnings,Propagate_Exceptions,Psect_Object,Pure,Pure_Function,Queueing_Policy,Relative_Deadline,Remote_Call_Interface,Remote_Types,Restrictions,Restriction_Warnings,Reviewable,Shared_Passive,Share_Generic,Short_Circuit_And_Or,Short_Descriptors,Simple_Storage_Pool_Type,Source_File_Name,Source_File_Name_Project,Source_Reference,Static_Elaboration_Desired,Storage_Size,Stream_Convert,Style_Checks,Subtitle,Suppress,Suppress_All,Suppress_Exception_Locations,Suppress_Initialization,Task_Dispatching_Policy,Task_Info,Task_Name,Task_Storage,Test_Case,Thread_Body,Thread_Local_Storage,Time_Slice,Title,Unchecked_Union,Unimplemented_Unit,Universal_Aliasing,Universal_Data,Unmodified,Unreferenced,Unreferenced_Objects,Unreserve_All_Interrupts,Unsuppress,Use_VADS_Size,Validity_Checks,Volatile,Volatile_Components,Warnings,Weak_External,Wide_Character_Encoding|}$0;"
],
"description": "Pragma Directive"
},
"Procedure Declaration": {
"prefix": "procedure",
"body": [
"${1|procedure,overriding procedure,not overriding procedure|} ${2:Name} (${3})${4|;, is abstract;, is null;, renames |}"
],
"description": "Procedure Declaration"
},
"Procedure Body": {
"prefix": "procedure",
"body": [
"${1|procedure,overriding procedure,not overriding procedure|} ${2:Name} ($3) is",
" $4",
"begin",
" $0",
"end ${2:Name};"
],
"description": "Procedure Body"
},
"Protected Type Declaration": {
"prefix": "protected",
"scope": "ada",
"body": [
"protected ${1:Name} is",
" $0",
"private",
" ",
"end ${1:Name};"
],
"description": "Protected Declaration"
},
"Protected Type Body": {
"prefix": "protected-body",
"scope": "ada",
"body": [
"protected body ${1:Name} is",
" $0",
"end ${1:Name};"
],
"description": "Protected Body"
},
"Record Type Definition": {
"prefix": "record",
"scope": "ada",
"body": [
"type ${1:Name} is ${2|record,tagged record,abstract tagged record,limited record,tagged limited record,abstract tagged limited record|}",
" $0",
"end record;"
],
"description": "Record Type Definition"
},
"Select Statement": {
"prefix": "select",
"scope": "ada",
"body": [
"select",
" $0",
"${1|or,else|}",
" ",
"end select;"
],
"description": "Select Statement"
},
"Select Statement - Asynchronous": {
"prefix": "select",
"scope": "ada",
"body": [
"select",
" $0",
"then abort",
" ",
"end select;"
],
"description": "Asynchronous Select Statement"
},
"Select Statement - Timed": {
"prefix": "select",
"scope": "ada",
"body": [
"select",
" $0",
"or",
" delay ${1:Delay_Amount};",
"end select;"
],
"description": "Timed Select Statement"
},
"Task Definition": {
"prefix": "task",
"scope": "ada",
"body": [
"${1|task,task type|} ${2:Name} is",
" $0",
"private",
" ",
"end ${2:Name};"
],
"description": "Task Definition"
},
"Task Body": {
"prefix": "task-body",
"scope": "ada",
"body": [
"task body ${1:Name} is",
" $2",
"begin",
" $0",
"end ${1:Name};"
],
"description": "Task body"
},
"While Loop Statement": {
"prefix": "while",
"body": [
"while ${1:Condition} loop",
" $0",
"end loop;"
],
"description": "While Loop Statement"
}
}