qsharp-lang 0.1.0-dev.1 → 1.0.5-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/dist/compiler/compiler.d.ts +2 -0
- package/dist/compiler/compiler.js +4 -1
- package/dist/compiler/worker-proxy.js +1 -0
- package/dist/debug-service/debug-service.js +11 -30
- package/dist/katas-content.generated.js +26 -26
- package/dist/language-service/language-service.d.ts +11 -7
- package/dist/language-service/language-service.js +54 -3
- package/dist/language-service/worker-proxy.js +2 -0
- package/lib/node/qsc_wasm.cjs +151 -177
- package/lib/node/qsc_wasm.d.cts +154 -139
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +169 -156
- package/lib/web/qsc_wasm.js +146 -172
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +3 -2
- package/LICENSE.txt +0 -21
package/lib/web/qsc_wasm.js
CHANGED
|
@@ -188,52 +188,74 @@ function debugString(val) {
|
|
|
188
188
|
return className;
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
|
-
* @
|
|
192
|
-
* @param {number} level
|
|
191
|
+
* @returns {string}
|
|
193
192
|
*/
|
|
194
|
-
export function
|
|
193
|
+
export function git_hash() {
|
|
195
194
|
try {
|
|
196
195
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
197
|
-
wasm.
|
|
196
|
+
wasm.git_hash(retptr);
|
|
198
197
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
199
198
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
200
|
-
|
|
201
|
-
throw takeObject(r0);
|
|
202
|
-
}
|
|
199
|
+
return getStringFromWasm0(r0, r1);
|
|
203
200
|
} finally {
|
|
204
201
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
202
|
+
wasm.__wbindgen_export_2(r0, r1);
|
|
205
203
|
}
|
|
206
204
|
}
|
|
207
205
|
|
|
208
206
|
/**
|
|
209
|
-
* @param {
|
|
210
|
-
|
|
211
|
-
export function setLogLevel(level) {
|
|
212
|
-
wasm.setLogLevel(level);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* @returns {any}
|
|
207
|
+
* @param {string} code
|
|
208
|
+
* @returns {string}
|
|
217
209
|
*/
|
|
218
|
-
export function
|
|
219
|
-
|
|
220
|
-
|
|
210
|
+
export function get_qir(code) {
|
|
211
|
+
try {
|
|
212
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
213
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
214
|
+
const len0 = WASM_VECTOR_LEN;
|
|
215
|
+
wasm.get_qir(retptr, ptr0, len0);
|
|
216
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
217
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
218
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
219
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
220
|
+
var ptr1 = r0;
|
|
221
|
+
var len1 = r1;
|
|
222
|
+
if (r3) {
|
|
223
|
+
ptr1 = 0; len1 = 0;
|
|
224
|
+
throw takeObject(r2);
|
|
225
|
+
}
|
|
226
|
+
return getStringFromWasm0(ptr1, len1);
|
|
227
|
+
} finally {
|
|
228
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
229
|
+
wasm.__wbindgen_export_2(ptr1, len1);
|
|
230
|
+
}
|
|
221
231
|
}
|
|
222
232
|
|
|
223
233
|
/**
|
|
224
234
|
* @param {string} name
|
|
225
|
-
* @returns {
|
|
235
|
+
* @returns {string | undefined}
|
|
226
236
|
*/
|
|
227
237
|
export function get_library_source_content(name) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
238
|
+
try {
|
|
239
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
240
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
241
|
+
const len0 = WASM_VECTOR_LEN;
|
|
242
|
+
wasm.get_library_source_content(retptr, ptr0, len0);
|
|
243
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
244
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
245
|
+
let v1;
|
|
246
|
+
if (r0 !== 0) {
|
|
247
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
248
|
+
wasm.__wbindgen_export_2(r0, r1 * 1);
|
|
249
|
+
}
|
|
250
|
+
return v1;
|
|
251
|
+
} finally {
|
|
252
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
253
|
+
}
|
|
232
254
|
}
|
|
233
255
|
|
|
234
256
|
/**
|
|
235
257
|
* @param {string} code
|
|
236
|
-
* @returns {
|
|
258
|
+
* @returns {string}
|
|
237
259
|
*/
|
|
238
260
|
export function get_hir(code) {
|
|
239
261
|
try {
|
|
@@ -243,13 +265,10 @@ export function get_hir(code) {
|
|
|
243
265
|
wasm.get_hir(retptr, ptr0, len0);
|
|
244
266
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
245
267
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
246
|
-
|
|
247
|
-
if (r2) {
|
|
248
|
-
throw takeObject(r1);
|
|
249
|
-
}
|
|
250
|
-
return takeObject(r0);
|
|
268
|
+
return getStringFromWasm0(r0, r1);
|
|
251
269
|
} finally {
|
|
252
270
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
271
|
+
wasm.__wbindgen_export_2(r0, r1);
|
|
253
272
|
}
|
|
254
273
|
}
|
|
255
274
|
|
|
@@ -265,7 +284,7 @@ function addBorrowedObject(obj) {
|
|
|
265
284
|
* @param {string} expr
|
|
266
285
|
* @param {Function} event_cb
|
|
267
286
|
* @param {number} shots
|
|
268
|
-
* @returns {
|
|
287
|
+
* @returns {boolean}
|
|
269
288
|
*/
|
|
270
289
|
export function run(code, expr, event_cb, shots) {
|
|
271
290
|
try {
|
|
@@ -281,7 +300,7 @@ export function run(code, expr, event_cb, shots) {
|
|
|
281
300
|
if (r2) {
|
|
282
301
|
throw takeObject(r1);
|
|
283
302
|
}
|
|
284
|
-
return
|
|
303
|
+
return r0 !== 0;
|
|
285
304
|
} finally {
|
|
286
305
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
287
306
|
heap[stack_pointer++] = undefined;
|
|
@@ -292,27 +311,44 @@ export function run(code, expr, event_cb, shots) {
|
|
|
292
311
|
* @param {string} solution_code
|
|
293
312
|
* @param {any} exercise_sources_js
|
|
294
313
|
* @param {Function} event_cb
|
|
295
|
-
* @returns {
|
|
314
|
+
* @returns {boolean}
|
|
296
315
|
*/
|
|
297
316
|
export function check_exercise_solution(solution_code, exercise_sources_js, event_cb) {
|
|
298
317
|
try {
|
|
299
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
300
318
|
const ptr0 = passStringToWasm0(solution_code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
301
319
|
const len0 = WASM_VECTOR_LEN;
|
|
302
|
-
wasm.check_exercise_solution(
|
|
320
|
+
const ret = wasm.check_exercise_solution(ptr0, len0, addHeapObject(exercise_sources_js), addBorrowedObject(event_cb));
|
|
321
|
+
return ret !== 0;
|
|
322
|
+
} finally {
|
|
323
|
+
heap[stack_pointer++] = undefined;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @param {any} callback
|
|
329
|
+
* @param {number} level
|
|
330
|
+
*/
|
|
331
|
+
export function initLogging(callback, level) {
|
|
332
|
+
try {
|
|
333
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
334
|
+
wasm.initLogging(retptr, addHeapObject(callback), level);
|
|
303
335
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
304
336
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
throw takeObject(r1);
|
|
337
|
+
if (r1) {
|
|
338
|
+
throw takeObject(r0);
|
|
308
339
|
}
|
|
309
|
-
return takeObject(r0);
|
|
310
340
|
} finally {
|
|
311
341
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
312
|
-
heap[stack_pointer++] = undefined;
|
|
313
342
|
}
|
|
314
343
|
}
|
|
315
344
|
|
|
345
|
+
/**
|
|
346
|
+
* @param {number} level
|
|
347
|
+
*/
|
|
348
|
+
export function setLogLevel(level) {
|
|
349
|
+
wasm.setLogLevel(level);
|
|
350
|
+
}
|
|
351
|
+
|
|
316
352
|
let cachedUint32Memory0 = null;
|
|
317
353
|
|
|
318
354
|
function getUint32Memory0() {
|
|
@@ -396,14 +432,14 @@ export class DebugService {
|
|
|
396
432
|
}
|
|
397
433
|
}
|
|
398
434
|
/**
|
|
399
|
-
* @returns {
|
|
435
|
+
* @returns {IQuantumStateList}
|
|
400
436
|
*/
|
|
401
437
|
capture_quantum_state() {
|
|
402
438
|
const ret = wasm.debugservice_capture_quantum_state(this.ptr);
|
|
403
439
|
return takeObject(ret);
|
|
404
440
|
}
|
|
405
441
|
/**
|
|
406
|
-
* @returns {
|
|
442
|
+
* @returns {IStackFrameList}
|
|
407
443
|
*/
|
|
408
444
|
get_stack_frames() {
|
|
409
445
|
const ret = wasm.debugservice_get_stack_frames(this.ptr);
|
|
@@ -412,7 +448,7 @@ export class DebugService {
|
|
|
412
448
|
/**
|
|
413
449
|
* @param {Function} event_cb
|
|
414
450
|
* @param {Uint32Array} ids
|
|
415
|
-
* @returns {
|
|
451
|
+
* @returns {IStructStepResult}
|
|
416
452
|
*/
|
|
417
453
|
eval_next(event_cb, ids) {
|
|
418
454
|
try {
|
|
@@ -435,7 +471,7 @@ export class DebugService {
|
|
|
435
471
|
/**
|
|
436
472
|
* @param {Function} event_cb
|
|
437
473
|
* @param {Uint32Array} ids
|
|
438
|
-
* @returns {
|
|
474
|
+
* @returns {IStructStepResult}
|
|
439
475
|
*/
|
|
440
476
|
eval_continue(event_cb, ids) {
|
|
441
477
|
try {
|
|
@@ -458,7 +494,7 @@ export class DebugService {
|
|
|
458
494
|
/**
|
|
459
495
|
* @param {Function} event_cb
|
|
460
496
|
* @param {Uint32Array} ids
|
|
461
|
-
* @returns {
|
|
497
|
+
* @returns {IStructStepResult}
|
|
462
498
|
*/
|
|
463
499
|
eval_step_in(event_cb, ids) {
|
|
464
500
|
try {
|
|
@@ -481,7 +517,7 @@ export class DebugService {
|
|
|
481
517
|
/**
|
|
482
518
|
* @param {Function} event_cb
|
|
483
519
|
* @param {Uint32Array} ids
|
|
484
|
-
* @returns {
|
|
520
|
+
* @returns {IStructStepResult}
|
|
485
521
|
*/
|
|
486
522
|
eval_step_out(event_cb, ids) {
|
|
487
523
|
try {
|
|
@@ -503,7 +539,7 @@ export class DebugService {
|
|
|
503
539
|
}
|
|
504
540
|
/**
|
|
505
541
|
* @param {string} path
|
|
506
|
-
* @returns {
|
|
542
|
+
* @returns {IBreakpointSpanList}
|
|
507
543
|
*/
|
|
508
544
|
get_breakpoints(path) {
|
|
509
545
|
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
@@ -512,7 +548,7 @@ export class DebugService {
|
|
|
512
548
|
return takeObject(ret);
|
|
513
549
|
}
|
|
514
550
|
/**
|
|
515
|
-
* @returns {
|
|
551
|
+
* @returns {IVariableList}
|
|
516
552
|
*/
|
|
517
553
|
get_locals() {
|
|
518
554
|
const ret = wasm.debugservice_get_locals(this.ptr);
|
|
@@ -553,17 +589,22 @@ export class LanguageService {
|
|
|
553
589
|
}
|
|
554
590
|
}
|
|
555
591
|
/**
|
|
592
|
+
* @param {IWorkspaceConfiguration} config
|
|
593
|
+
*/
|
|
594
|
+
update_configuration(config) {
|
|
595
|
+
wasm.languageservice_update_configuration(this.ptr, addHeapObject(config));
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
556
598
|
* @param {string} uri
|
|
557
599
|
* @param {number} version
|
|
558
600
|
* @param {string} text
|
|
559
|
-
* @param {boolean} is_exe
|
|
560
601
|
*/
|
|
561
|
-
update_document(uri, version, text
|
|
602
|
+
update_document(uri, version, text) {
|
|
562
603
|
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
563
604
|
const len0 = WASM_VECTOR_LEN;
|
|
564
605
|
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
565
606
|
const len1 = WASM_VECTOR_LEN;
|
|
566
|
-
wasm.languageservice_update_document(this.ptr, ptr0, len0, version, ptr1, len1
|
|
607
|
+
wasm.languageservice_update_document(this.ptr, ptr0, len0, version, ptr1, len1);
|
|
567
608
|
}
|
|
568
609
|
/**
|
|
569
610
|
* @param {string} uri
|
|
@@ -576,117 +617,46 @@ export class LanguageService {
|
|
|
576
617
|
/**
|
|
577
618
|
* @param {string} uri
|
|
578
619
|
* @param {number} offset
|
|
579
|
-
* @returns {
|
|
620
|
+
* @returns {ICompletionList}
|
|
580
621
|
*/
|
|
581
622
|
get_completions(uri, offset) {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
wasm.languageservice_get_completions(retptr, this.ptr, ptr0, len0, offset);
|
|
587
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
588
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
589
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
590
|
-
if (r2) {
|
|
591
|
-
throw takeObject(r1);
|
|
592
|
-
}
|
|
593
|
-
return takeObject(r0);
|
|
594
|
-
} finally {
|
|
595
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
596
|
-
}
|
|
623
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
624
|
+
const len0 = WASM_VECTOR_LEN;
|
|
625
|
+
const ret = wasm.languageservice_get_completions(this.ptr, ptr0, len0, offset);
|
|
626
|
+
return takeObject(ret);
|
|
597
627
|
}
|
|
598
628
|
/**
|
|
599
629
|
* @param {string} uri
|
|
600
630
|
* @param {number} offset
|
|
601
|
-
* @returns {
|
|
631
|
+
* @returns {IDefinition | undefined}
|
|
602
632
|
*/
|
|
603
633
|
get_definition(uri, offset) {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
wasm.languageservice_get_definition(retptr, this.ptr, ptr0, len0, offset);
|
|
609
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
610
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
611
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
612
|
-
if (r2) {
|
|
613
|
-
throw takeObject(r1);
|
|
614
|
-
}
|
|
615
|
-
return takeObject(r0);
|
|
616
|
-
} finally {
|
|
617
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
618
|
-
}
|
|
634
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
635
|
+
const len0 = WASM_VECTOR_LEN;
|
|
636
|
+
const ret = wasm.languageservice_get_definition(this.ptr, ptr0, len0, offset);
|
|
637
|
+
return takeObject(ret);
|
|
619
638
|
}
|
|
620
639
|
/**
|
|
621
640
|
* @param {string} uri
|
|
622
641
|
* @param {number} offset
|
|
623
|
-
* @returns {
|
|
642
|
+
* @returns {IHover | undefined}
|
|
624
643
|
*/
|
|
625
644
|
get_hover(uri, offset) {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
wasm.languageservice_get_hover(retptr, this.ptr, ptr0, len0, offset);
|
|
631
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
632
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
633
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
634
|
-
if (r2) {
|
|
635
|
-
throw takeObject(r1);
|
|
636
|
-
}
|
|
637
|
-
return takeObject(r0);
|
|
638
|
-
} finally {
|
|
639
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
*/
|
|
645
|
-
export class StructStepResult {
|
|
646
|
-
|
|
647
|
-
static __wrap(ptr) {
|
|
648
|
-
const obj = Object.create(StructStepResult.prototype);
|
|
649
|
-
obj.ptr = ptr;
|
|
650
|
-
|
|
651
|
-
return obj;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
__destroy_into_raw() {
|
|
655
|
-
const ptr = this.ptr;
|
|
656
|
-
this.ptr = 0;
|
|
657
|
-
|
|
658
|
-
return ptr;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
free() {
|
|
662
|
-
const ptr = this.__destroy_into_raw();
|
|
663
|
-
wasm.__wbg_structstepresult_free(ptr);
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
* @returns {number}
|
|
667
|
-
*/
|
|
668
|
-
get id() {
|
|
669
|
-
const ret = wasm.__wbg_get_structstepresult_id(this.ptr);
|
|
670
|
-
return ret >>> 0;
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* @param {number} arg0
|
|
674
|
-
*/
|
|
675
|
-
set id(arg0) {
|
|
676
|
-
wasm.__wbg_set_structstepresult_id(this.ptr, arg0);
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* @returns {number}
|
|
680
|
-
*/
|
|
681
|
-
get value() {
|
|
682
|
-
const ret = wasm.__wbg_get_structstepresult_value(this.ptr);
|
|
683
|
-
return ret >>> 0;
|
|
645
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
646
|
+
const len0 = WASM_VECTOR_LEN;
|
|
647
|
+
const ret = wasm.languageservice_get_hover(this.ptr, ptr0, len0, offset);
|
|
648
|
+
return takeObject(ret);
|
|
684
649
|
}
|
|
685
650
|
/**
|
|
686
|
-
* @param {
|
|
651
|
+
* @param {string} uri
|
|
652
|
+
* @param {number} offset
|
|
653
|
+
* @returns {ISignatureHelp | undefined}
|
|
687
654
|
*/
|
|
688
|
-
|
|
689
|
-
wasm.
|
|
655
|
+
get_signature_help(uri, offset) {
|
|
656
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
657
|
+
const len0 = WASM_VECTOR_LEN;
|
|
658
|
+
const ret = wasm.languageservice_get_signature_help(this.ptr, ptr0, len0, offset);
|
|
659
|
+
return takeObject(ret);
|
|
690
660
|
}
|
|
691
661
|
}
|
|
692
662
|
|
|
@@ -727,17 +697,10 @@ function getImports() {
|
|
|
727
697
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
728
698
|
takeObject(arg0);
|
|
729
699
|
};
|
|
730
|
-
imports.wbg.
|
|
731
|
-
const ret =
|
|
700
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
701
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
732
702
|
return addHeapObject(ret);
|
|
733
703
|
};
|
|
734
|
-
imports.wbg.__wbg_stack_3090cd8fd3702c6e = function(arg0, arg1) {
|
|
735
|
-
const ret = getObject(arg1).stack;
|
|
736
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
737
|
-
const len0 = WASM_VECTOR_LEN;
|
|
738
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
739
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
740
|
-
};
|
|
741
704
|
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
742
705
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
743
706
|
return ret;
|
|
@@ -746,12 +709,8 @@ function getImports() {
|
|
|
746
709
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
747
710
|
return addHeapObject(ret);
|
|
748
711
|
};
|
|
749
|
-
imports.wbg.
|
|
750
|
-
const ret =
|
|
751
|
-
return addHeapObject(ret);
|
|
752
|
-
};
|
|
753
|
-
imports.wbg.__wbg_structstepresult_new = function(arg0) {
|
|
754
|
-
const ret = StructStepResult.__wrap(arg0);
|
|
712
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
713
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
755
714
|
return addHeapObject(ret);
|
|
756
715
|
};
|
|
757
716
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
@@ -762,18 +721,37 @@ function getImports() {
|
|
|
762
721
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
763
722
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
764
723
|
};
|
|
765
|
-
imports.wbg.
|
|
766
|
-
const
|
|
767
|
-
|
|
724
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
725
|
+
const val = getObject(arg0);
|
|
726
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
727
|
+
return ret;
|
|
728
|
+
};
|
|
729
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
730
|
+
const ret = getObject(arg0) === undefined;
|
|
731
|
+
return ret;
|
|
732
|
+
};
|
|
733
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
734
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
735
|
+
return ret;
|
|
768
736
|
};
|
|
769
737
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
770
738
|
const ret = getObject(arg0);
|
|
771
739
|
return addHeapObject(ret);
|
|
772
740
|
};
|
|
773
|
-
imports.wbg.
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
|
|
741
|
+
imports.wbg.__wbg_new_0232637a3cb0b1a7 = function() {
|
|
742
|
+
const ret = new Error();
|
|
743
|
+
return addHeapObject(ret);
|
|
744
|
+
};
|
|
745
|
+
imports.wbg.__wbg_stack_3090cd8fd3702c6e = function(arg0, arg1) {
|
|
746
|
+
const ret = getObject(arg1).stack;
|
|
747
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
748
|
+
const len0 = WASM_VECTOR_LEN;
|
|
749
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
750
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
751
|
+
};
|
|
752
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
753
|
+
const ret = arg0;
|
|
754
|
+
return addHeapObject(ret);
|
|
777
755
|
};
|
|
778
756
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
779
757
|
const ret = getObject(arg0) == getObject(arg1);
|
|
@@ -790,8 +768,8 @@ function getImports() {
|
|
|
790
768
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
791
769
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
792
770
|
};
|
|
793
|
-
imports.wbg.
|
|
794
|
-
const ret =
|
|
771
|
+
imports.wbg.__wbg_getwithrefkey_5e6d9547403deab8 = function(arg0, arg1) {
|
|
772
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
795
773
|
return addHeapObject(ret);
|
|
796
774
|
};
|
|
797
775
|
imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
@@ -895,10 +873,6 @@ function getImports() {
|
|
|
895
873
|
const ret = global.global;
|
|
896
874
|
return addHeapObject(ret);
|
|
897
875
|
}, arguments) };
|
|
898
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
899
|
-
const ret = getObject(arg0) === undefined;
|
|
900
|
-
return ret;
|
|
901
|
-
};
|
|
902
876
|
imports.wbg.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
|
|
903
877
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
904
878
|
};
|
package/lib/web/qsc_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qsharp-lang",
|
|
3
3
|
"description": "qsharp language package for quantum development",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.0.5-dev",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=16.17.0"
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"build": "npm run generate && npm run build:tsc",
|
|
26
26
|
"generate": "node generate_katas_content.js && node generate_samples_content.js",
|
|
27
27
|
"build:tsc": "node ../node_modules/typescript/bin/tsc -p ./src/tsconfig.json",
|
|
28
|
-
"tsc:watch": "node ../node_modules/typescript/bin/tsc -p ./src/tsconfig.json --watch"
|
|
28
|
+
"tsc:watch": "node ../node_modules/typescript/bin/tsc -p ./src/tsconfig.json --watch",
|
|
29
|
+
"test": "node --test"
|
|
29
30
|
},
|
|
30
31
|
"type": "module",
|
|
31
32
|
"files": [
|
package/LICENSE.txt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE
|