motoko 3.0.2 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
package/contrib/monaco.js CHANGED
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const { keywords, typeKeywords } = require('../lib/keywords');
4
+ const snippetConfig = require('./snippets.json');
4
5
 
5
6
  /// Monaco editor configuration
6
- exports.configure = (monaco) => {
7
+ exports.configure = (monaco, { snippets } = {}) => {
7
8
  monaco.languages.register({ id: 'motoko' });
8
9
  monaco.languages.setLanguageConfiguration('motoko', {
9
10
  comments: {
@@ -121,4 +122,32 @@ exports.configure = (monaco) => {
121
122
  ],
122
123
  },
123
124
  });
125
+
126
+ if (snippets) {
127
+ monaco.languages.registerCompletionItemProvider('motoko', {
128
+ provideCompletionItems() {
129
+ return {
130
+ suggestions: Object.entries(snippetConfig).map(
131
+ ([name, snippet]) => {
132
+ return {
133
+ label:
134
+ typeof snippet.prefix === 'string'
135
+ ? snippet.prefix
136
+ : snippet.prefix[0],
137
+ detail: name,
138
+ insertText:
139
+ typeof snippet.body === 'string'
140
+ ? snippet.body
141
+ : snippet.body.join('\n'),
142
+ // insert as snippet (https://microsoft.github.io/monaco-editor/api/enums/monaco.languages.CompletionItemInsertTextRule.html)
143
+ insertTextRules: 4,
144
+ // snippet completion (https://microsoft.github.io/monaco-editor/api/enums/monaco.languages.CompletionItemKind.html)
145
+ kind: 27,
146
+ };
147
+ },
148
+ ),
149
+ };
150
+ },
151
+ });
152
+ }
124
153
  };
@@ -0,0 +1,425 @@
1
+ {
2
+ "For Loop (Collection)": {
3
+ "prefix": [
4
+ "for-each"
5
+ ],
6
+ "body": [
7
+ "for(${1:item} in ${2:collection}.vals()) {",
8
+ "\t$0",
9
+ "};"
10
+ ],
11
+ "description": "for loop which iterates through a collection"
12
+ },
13
+ "For Loop (Range)": {
14
+ "prefix": [
15
+ "for-range"
16
+ ],
17
+ "body": [
18
+ "for(${1:i} in Iter.range(0, ${2:count} - 1)) {",
19
+ "\t$0",
20
+ "};"
21
+ ],
22
+ "description": "for loop over a numeric range"
23
+ },
24
+ "Range (Inclusive)": {
25
+ "prefix": [
26
+ "iter-range"
27
+ ],
28
+ "body": [
29
+ "Iter.range(${1:start}, ${2:endInclusive})"
30
+ ],
31
+ "description": "iterator over a range of values (including the upper bound)."
32
+ },
33
+ "Range (Exclusive)": {
34
+ "prefix": [
35
+ "iter-range-exclusive"
36
+ ],
37
+ "body": [
38
+ "Iter.range(${1:start}, ${2:end} - 1)"
39
+ ],
40
+ "description": "iterator over a range of values (excluding the upper bound)."
41
+ },
42
+ "Type Declaration": {
43
+ "prefix": [
44
+ "type"
45
+ ],
46
+ "body": [
47
+ "type ${1:Name} = ${2:declaration};",
48
+ "$0"
49
+ ],
50
+ "description": "simple type declaration"
51
+ },
52
+ "Object Type": {
53
+ "prefix": [
54
+ "type-obj"
55
+ ],
56
+ "body": [
57
+ "type ${1:Name} = {",
58
+ "\t${2:attribute} : ${3:Type};",
59
+ "};",
60
+ "$0"
61
+ ],
62
+ "description": "object / record type block"
63
+ },
64
+ "Type Variant": {
65
+ "prefix": [
66
+ "type-variant"
67
+ ],
68
+ "body": [
69
+ "type ${1:Name} = {",
70
+ "\t#${2:tag};",
71
+ "};",
72
+ "$0"
73
+ ],
74
+ "description": "variant type block"
75
+ },
76
+ "Mutable Variable": {
77
+ "prefix": [
78
+ "var"
79
+ ],
80
+ "body": [
81
+ "var ${1:name} = ${2:value};",
82
+ "$0"
83
+ ],
84
+ "description": "declare a mutable variable"
85
+ },
86
+ "Immutable Variable": {
87
+ "prefix": [
88
+ "let"
89
+ ],
90
+ "body": [
91
+ "let ${1:name} = ${2:value};",
92
+ "$0"
93
+ ],
94
+ "description": "declare an immutable variable"
95
+ },
96
+ "Simple Function": {
97
+ "prefix": [
98
+ "func"
99
+ ],
100
+ "body": [
101
+ "func ${1:name}(${2:arg} : ${5:Type}) : ${4:()} {",
102
+ "\t$0",
103
+ "};"
104
+ ],
105
+ "description": "simple function declaration"
106
+ },
107
+ "Public Actor Function": {
108
+ "prefix": [
109
+ "func-actor"
110
+ ],
111
+ "body": [
112
+ "public func ${1:name}(${2:arg} : ${5:Type}) : async ${4:()} {",
113
+ "\t$0",
114
+ "};"
115
+ ],
116
+ "description": "public actor function declaration"
117
+ },
118
+ "Base Library Import": {
119
+ "prefix": [
120
+ "import-base"
121
+ ],
122
+ "body": [
123
+ "import ${1:Module} \"mo:base/${1}\";",
124
+ "$0"
125
+ ]
126
+ },
127
+ "Canister Import": {
128
+ "prefix": [
129
+ "import-canister"
130
+ ],
131
+ "body": [
132
+ "import ${1:Module} \"canister:${2}\";",
133
+ "$0"
134
+ ]
135
+ },
136
+ "Switch Statement": {
137
+ "prefix": [
138
+ "switch"
139
+ ],
140
+ "body": [
141
+ "switch(${1:input}) {",
142
+ "\tcase($2) { $0 };",
143
+ "\tcase($3) { };",
144
+ "};"
145
+ ]
146
+ },
147
+ "Switch Statement (Option)": {
148
+ "prefix": [
149
+ "switch-option"
150
+ ],
151
+ "body": [
152
+ "switch(${1:input}) {",
153
+ "\tcase(?${2:value}) { $0 };",
154
+ "\tcase(null) { };",
155
+ "};"
156
+ ]
157
+ },
158
+ "Switch Statement (Result)": {
159
+ "prefix": [
160
+ "switch-result"
161
+ ],
162
+ "body": [
163
+ "switch(${1:input}) {",
164
+ "\tcase(#ok(${2:value})) { $0 };",
165
+ "\tcase(#err(${3:error})) { };",
166
+ "};"
167
+ ]
168
+ },
169
+ "Module": {
170
+ "prefix": [
171
+ "module"
172
+ ],
173
+ "body": [
174
+ "module {",
175
+ "\tpublic let ${1:value} = ${2:0};",
176
+ "\t",
177
+ "\tpublic func ${3:name}(${4:arg : Text}) : ${5:()} {",
178
+ "\t\t$0",
179
+ "\t};",
180
+ "};"
181
+ ]
182
+ },
183
+ "Actor": {
184
+ "prefix": [
185
+ "actor"
186
+ ],
187
+ "body": [
188
+ "actor {",
189
+ "\tstable var ${1:state} = ${2:0};",
190
+ "\t",
191
+ "\tpublic func ${3:name}(${4:arg : Text}) : async ${5:()} {",
192
+ "\t\t$0",
193
+ "\t};",
194
+ "};"
195
+ ]
196
+ },
197
+ "Actor Class": {
198
+ "prefix": [
199
+ "actor-class"
200
+ ],
201
+ "body": [
202
+ "actor class ${1:Name}($2) = self {",
203
+ "\tstable var ${3:state} = ${4:0};",
204
+ "\t",
205
+ "\tpublic func ${5:name}(${6:input : Text}) : async ${7:()} {",
206
+ "\t\t$0",
207
+ "\t};",
208
+ "};"
209
+ ]
210
+ },
211
+ "Class": {
212
+ "prefix": [
213
+ "class"
214
+ ],
215
+ "body": [
216
+ "class ${1:Name}($2) = self {",
217
+ "\tvar ${3:state} = ${4:0};",
218
+ "\t",
219
+ "\tpublic func ${5:name}(${6:input : Text}) : ${7:()} {",
220
+ "\t\t$0",
221
+ "\t};",
222
+ "};"
223
+ ]
224
+ },
225
+ "Record": {
226
+ "prefix": [
227
+ "record"
228
+ ],
229
+ "body": [
230
+ "{",
231
+ "\t${1:key} = ${2:value};",
232
+ "}"
233
+ ],
234
+ "description": "record value (equivalent to an object in JS, dictionary in Python)"
235
+ },
236
+ "Do Block": {
237
+ "prefix": [
238
+ "do"
239
+ ],
240
+ "body": [
241
+ "do {",
242
+ "\t$0",
243
+ "}"
244
+ ]
245
+ },
246
+ "Anonymous Function": {
247
+ "prefix": [
248
+ "lambda"
249
+ ],
250
+ "body": [
251
+ "func ($1) { $0 }"
252
+ ],
253
+ "description": "a lambda expression"
254
+ },
255
+ "Array Literal": {
256
+ "prefix": [
257
+ "array"
258
+ ],
259
+ "body": [
260
+ "[$0]"
261
+ ],
262
+ "description": "an immutable array (values cannot be replaced)"
263
+ },
264
+ "Mutable Array Literal": {
265
+ "prefix": [
266
+ "array-mut"
267
+ ],
268
+ "body": [
269
+ "[var $0]"
270
+ ],
271
+ "description": "a mutable array (values can be replaced)"
272
+ },
273
+ "New Array": {
274
+ "prefix": [
275
+ "array-new"
276
+ ],
277
+ "body": [
278
+ "var ${1:array} = [];",
279
+ "$0"
280
+ ]
281
+ },
282
+ "New Hash Map": {
283
+ "prefix": [
284
+ "hash-map-new"
285
+ ],
286
+ "body": [
287
+ "let ${1:map} = HashMap.HashMap<${2:Text}, ${3:Nat}>(0, ${2}.equal, ${2}.hash);",
288
+ "$0"
289
+ ]
290
+ },
291
+ "New Trie": {
292
+ "prefix": [
293
+ "trie-new"
294
+ ],
295
+ "body": [
296
+ "var ${1:trie} = Trie.empty<${2:Text}, ${3:Nat}>();",
297
+ "$0"
298
+ ]
299
+ },
300
+ "New Trie Map": {
301
+ "prefix": [
302
+ "trie-map-new"
303
+ ],
304
+ "body": [
305
+ "let ${1:map} = TrieMap.TrieMap<${2:Text}, ${3:Nat}>(0);",
306
+ "$0"
307
+ ]
308
+ },
309
+ "New RB Tree": {
310
+ "prefix": [
311
+ "rb-tree-new"
312
+ ],
313
+ "body": [
314
+ "let ${1:map} = RBTree.RBTree<${2:Text}, ${3:Nat}>(${2}.compare);",
315
+ "$0"
316
+ ]
317
+ },
318
+ "New Trie Set": {
319
+ "prefix": [
320
+ "trie-set-new"
321
+ ],
322
+ "body": [
323
+ "let ${1:set} = TrieSet.empty<${2:Text}>();",
324
+ "$0"
325
+ ]
326
+ },
327
+ "New Deque": {
328
+ "prefix": [
329
+ "deque-new"
330
+ ],
331
+ "body": [
332
+ "let ${1:queue} = Deque.empty<${2:Text}>();",
333
+ "$0"
334
+ ]
335
+ },
336
+ "New List": {
337
+ "prefix": [
338
+ "list-new"
339
+ ],
340
+ "body": [
341
+ "var ${1:list} = List.nil<${2:Text}>();",
342
+ "$0"
343
+ ]
344
+ },
345
+ "Sort Array": {
346
+ "prefix": [
347
+ "sort-array"
348
+ ],
349
+ "body": [
350
+ "Array.sort<$1>(${2:array}, func (a : $1, b : $1) { ${3:#equal} })"
351
+ ]
352
+ },
353
+ "Ok (Result)": {
354
+ "prefix": [
355
+ "ok"
356
+ ],
357
+ "body": [
358
+ "#ok($0)"
359
+ ]
360
+ },
361
+ "Error (Result)": {
362
+ "prefix": [
363
+ "err"
364
+ ],
365
+ "body": [
366
+ "#err($0)"
367
+ ]
368
+ },
369
+ "Array to Blob": {
370
+ "prefix": [
371
+ "array-2-blob"
372
+ ],
373
+ "body": [
374
+ "Blob.fromArray(${1:array})"
375
+ ]
376
+ },
377
+ "Blob to Array": {
378
+ "prefix": [
379
+ "blob-2-array"
380
+ ],
381
+ "body": [
382
+ "Blob.toArray(${1:blob})"
383
+ ]
384
+ },
385
+ "Array to Buffer": {
386
+ "prefix": [
387
+ "array-2-buffer"
388
+ ],
389
+ "body": [
390
+ "Buffer.fromArray(${1:array})"
391
+ ]
392
+ },
393
+ "Buffer to Array": {
394
+ "prefix": [
395
+ "buffer-2-array"
396
+ ],
397
+ "body": [
398
+ "Buffer.toArray(${1:buffer})"
399
+ ]
400
+ },
401
+ "Principal to Text": {
402
+ "prefix": [
403
+ "principal-2-text"
404
+ ],
405
+ "body": [
406
+ "Principal.toText(${1:principal})"
407
+ ]
408
+ },
409
+ "Text to Principal": {
410
+ "prefix": [
411
+ "text-2-principal"
412
+ ],
413
+ "body": [
414
+ "Principal.fromText(${1:text})"
415
+ ]
416
+ },
417
+ "Actor to Principal": {
418
+ "prefix": [
419
+ "actor-2-principal"
420
+ ],
421
+ "body": [
422
+ "Principal.fromActor(${1:actor})"
423
+ ]
424
+ }
425
+ }
package/lib/ast.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface Source {
17
17
  export interface Node extends Partial<Source> {
18
18
  name: string;
19
19
  type?: string;
20
+ doc?: string;
20
21
  declaration?: Source;
21
22
  args?: AST[];
22
23
  }
package/lib/ast.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../src/ast.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,WAAW,EAAE,GAAG,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;AACvE,oBAAY,YAAY,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM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EAAE,MAAM,CAAC,CAAC;AACpC,oBAAY,GAAG,GAAG,GAAG,EAAE,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;AAE/C,MAAM,WAAW,MAAM;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,IAAK,SAAQ,OAAO,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;CAChB;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CAAC;AACrD,wBAAgB,WAAW,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,EAAE,CAAC;AACvD,wBAAgB,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC"}
package/lib/ast.js CHANGED
@@ -25,6 +25,12 @@ function simplifyAST(ast) {
25
25
  ? { name: typeAst }
26
26
  : simplifyAST(typeAst))), { type });
27
27
  }
28
+ if (ast.name === '*') {
29
+ const [doc, docAst] = ast.args;
30
+ return Object.assign(Object.assign({}, (typeof docAst === 'string'
31
+ ? { name: docAst }
32
+ : simplifyAST(docAst))), { doc });
33
+ }
28
34
  return {
29
35
  name: ast.name,
30
36
  args: simplifyAST(ast.args),
package/lib/ast.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ast.js","sourceRoot":"","sources":["../src/ast.ts"],"names":[],"mappings":";;;AA4BA,SAAgB,WAAW,CAAC,GAAgB;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAA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IAAI,EAAE,OAAO,EAAE;YACnB,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,KAC3B,IAAI,IACN;KACL;IACD,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;QAClB,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,CAAC,IAA6B,CAAC;QACxD,uCACO,CAAC,OAAO,MAAM,KAAK,QAAQ;YAC1B,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;YAClB,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,KAC1B,GAAG,IACL;KACL;IACD,OAAO;QACH,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC;KAC9B,CAAC;AACN,CAAC;AAhDD,kCAgDC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motoko",
3
- "version": "3.0.2",
3
+ "version": "3.1.1",
4
4
  "description": "Compile and run Motoko smart contracts in Node.js or the browser.",
5
5
  "author": "Ryan Vandersmith (https://github.com/rvanasa)",
6
6
  "license": "Apache-2.0",
@@ -22,7 +22,7 @@
22
22
  "cross-fetch": "3.1.5",
23
23
  "debug": "4.3.4",
24
24
  "isomorphic-parse-github-url": "1.0.2",
25
- "sanitize-filename": "^1.6.3"
25
+ "sanitize-filename": "1.6.3"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/jest": "^28.1.3",