yuku-codegen 0.5.46 → 0.5.48

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.
Files changed (2) hide show
  1. package/encode.js +45 -45
  2. package/package.json +12 -12
package/encode.js CHANGED
@@ -203,10 +203,10 @@ function encode(program) {
203
203
  const rt_ = n.returnType == null ? NULL : encNode(n.returnType);
204
204
  const idx = alloc();
205
205
  tagAt(idx, 2);
206
- slotAt(idx, 0, params);
207
- slotAt(idx, 1, body);
208
- slotAt(idx, 2, tp);
209
- slotAt(idx, 3, rt_);
206
+ slotAt(idx, 1, params);
207
+ slotAt(idx, 3, body);
208
+ slotAt(idx, 0, tp);
209
+ slotAt(idx, 2, rt_);
210
210
  flagsAt(idx, (n.expression ? 1 : 0) | (n.async ? 2 : 0));
211
211
  spanAt(idx, asStart(n), asEnd(n));
212
212
  recordComments(n, idx);
@@ -221,10 +221,10 @@ function encode(program) {
221
221
  const idx = alloc();
222
222
  tagAt(idx, 3);
223
223
  slotAt(idx, 0, id);
224
- slotAt(idx, 1, params);
225
- slotAt(idx, 2, body);
226
- slotAt(idx, 3, tp);
227
- slotAt(idx, 4, rt_);
224
+ slotAt(idx, 2, params);
225
+ slotAt(idx, 4, body);
226
+ slotAt(idx, 1, tp);
227
+ slotAt(idx, 3, rt_);
228
228
  flagsAt(idx,
229
229
  ((kind & 3) << 0)
230
230
  | (n.generator ? 4 : 0)
@@ -410,14 +410,14 @@ function encode(program) {
410
410
  }
411
411
  function enc_call_expression(n) {
412
412
  const c_callee = n.callee == null ? NULL : encNode(n.callee);
413
- const c_arguments = encArr(n.arguments, encNode);
414
413
  const c_type_arguments = n.typeArguments == null ? NULL : encNode(n.typeArguments);
414
+ const c_arguments = encArr(n.arguments, encNode);
415
415
  const idx = alloc();
416
416
  tagAt(idx, 19);
417
417
  slotAt(idx, 0, c_callee);
418
+ slotAt(idx, 1, c_type_arguments);
418
419
  f0At(idx, c_arguments.len);
419
- slotAt(idx, 1, c_arguments.start);
420
- slotAt(idx, 2, c_type_arguments);
420
+ slotAt(idx, 2, c_arguments.start);
421
421
  flagsAt(idx, 0 | (n.optional ? 1 : 0));
422
422
  spanAt(idx, asStart(n), asEnd(n));
423
423
  recordComments(n, idx);
@@ -434,27 +434,27 @@ function encode(program) {
434
434
  }
435
435
  function enc_tagged_template_expression(n) {
436
436
  const c_tag = n.tag == null ? NULL : encNode(n.tag);
437
- const c_quasi = n.quasi == null ? NULL : encNode(n.quasi);
438
437
  const c_type_arguments = n.typeArguments == null ? NULL : encNode(n.typeArguments);
438
+ const c_quasi = n.quasi == null ? NULL : encNode(n.quasi);
439
439
  const idx = alloc();
440
440
  tagAt(idx, 21);
441
441
  slotAt(idx, 0, c_tag);
442
- slotAt(idx, 1, c_quasi);
443
- slotAt(idx, 2, c_type_arguments);
442
+ slotAt(idx, 1, c_type_arguments);
443
+ slotAt(idx, 2, c_quasi);
444
444
  spanAt(idx, asStart(n), asEnd(n));
445
445
  recordComments(n, idx);
446
446
  return idx;
447
447
  }
448
448
  function enc_new_expression(n) {
449
449
  const c_callee = n.callee == null ? NULL : encNode(n.callee);
450
- const c_arguments = encArr(n.arguments, encNode);
451
450
  const c_type_arguments = n.typeArguments == null ? NULL : encNode(n.typeArguments);
451
+ const c_arguments = encArr(n.arguments, encNode);
452
452
  const idx = alloc();
453
453
  tagAt(idx, 22);
454
454
  slotAt(idx, 0, c_callee);
455
+ slotAt(idx, 1, c_type_arguments);
455
456
  f0At(idx, c_arguments.len);
456
- slotAt(idx, 1, c_arguments.start);
457
- slotAt(idx, 2, c_type_arguments);
457
+ slotAt(idx, 2, c_arguments.start);
458
458
  spanAt(idx, asStart(n), asEnd(n));
459
459
  recordComments(n, idx);
460
460
  return idx;
@@ -511,12 +511,12 @@ function encode(program) {
511
511
  f0At(idx, decs.len);
512
512
  slotAt(idx, 0, decs.start);
513
513
  slotAt(idx, 1, id);
514
- slotAt(idx, 2, sc);
515
- slotAt(idx, 3, body);
516
- slotAt(idx, 4, tp);
517
- slotAt(idx, 5, sta);
518
- slotAt(idx, 6, imps.start);
519
- slotAt(idx, 7, imps.len);
514
+ slotAt(idx, 3, sc);
515
+ slotAt(idx, 7, body);
516
+ slotAt(idx, 2, tp);
517
+ slotAt(idx, 4, sta);
518
+ slotAt(idx, 5, imps.start);
519
+ slotAt(idx, 6, imps.len);
520
520
  flagsAt(idx, ((kind & 1) << 0) | (n.abstract ? 2 : 0) | (n.declare ? 4 : 0));
521
521
  spanAt(idx, asStart(n), asEnd(n));
522
522
  recordComments(n, idx);
@@ -564,8 +564,8 @@ function encode(program) {
564
564
  f0At(idx, decs.len);
565
565
  slotAt(idx, 0, decs.start);
566
566
  slotAt(idx, 1, k);
567
- slotAt(idx, 2, v);
568
- slotAt(idx, 3, ta);
567
+ slotAt(idx, 3, v);
568
+ slotAt(idx, 2, ta);
569
569
  flagsAt(idx,
570
570
  (n.computed ? 1 : 0) |
571
571
  (n.static ? 2 : 0) |
@@ -994,31 +994,31 @@ function encode(program) {
994
994
  return idx;
995
995
  }
996
996
  function enc_assignment_pattern(n) {
997
- const c_left = n.left == null ? NULL : encBindingTarget(n.left);
998
- const c_right = n.right == null ? NULL : encNode(n.right);
999
997
  const c_decorators = encArr(n.decorators, encNode);
998
+ const c_left = n.left == null ? NULL : encBindingTarget(n.left);
1000
999
  const c_type_annotation = n.typeAnnotation == null ? NULL : encNode(n.typeAnnotation);
1000
+ const c_right = n.right == null ? NULL : encNode(n.right);
1001
1001
  const idx = alloc();
1002
1002
  tagAt(idx, 69);
1003
- slotAt(idx, 0, c_left);
1004
- slotAt(idx, 1, c_right);
1005
1003
  f0At(idx, c_decorators.len);
1006
- slotAt(idx, 2, c_decorators.start);
1007
- slotAt(idx, 3, c_type_annotation);
1004
+ slotAt(idx, 0, c_decorators.start);
1005
+ slotAt(idx, 1, c_left);
1006
+ slotAt(idx, 2, c_type_annotation);
1007
+ slotAt(idx, 3, c_right);
1008
1008
  flagsAt(idx, 0 | (n.optional ? 1 : 0));
1009
1009
  spanAt(idx, asStart(n), asEnd(n));
1010
1010
  recordComments(n, idx);
1011
1011
  return idx;
1012
1012
  }
1013
1013
  function enc_binding_rest_element(n) {
1014
- const c_argument = n.argument == null ? NULL : encBindingTarget(n.argument);
1015
1014
  const c_decorators = encArr(n.decorators, encNode);
1015
+ const c_argument = n.argument == null ? NULL : encBindingTarget(n.argument);
1016
1016
  const c_type_annotation = n.typeAnnotation == null ? NULL : encNode(n.typeAnnotation);
1017
1017
  const idx = alloc();
1018
1018
  tagAt(idx, 70);
1019
- slotAt(idx, 0, c_argument);
1020
1019
  f0At(idx, c_decorators.len);
1021
- slotAt(idx, 1, c_decorators.start);
1020
+ slotAt(idx, 0, c_decorators.start);
1021
+ slotAt(idx, 1, c_argument);
1022
1022
  slotAt(idx, 2, c_type_annotation);
1023
1023
  flagsAt(idx, 0 | (n.optional ? 1 : 0));
1024
1024
  spanAt(idx, asStart(n), asEnd(n));
@@ -1040,10 +1040,10 @@ function encode(program) {
1040
1040
  const ta = n.typeAnnotation == null ? NULL : encNode(n.typeAnnotation);
1041
1041
  const idx = alloc();
1042
1042
  tagAt(idx, 71);
1043
- f0At(idx, r.len);
1044
- slotAt(idx, 0, r.start);
1045
- slotAt(idx, 1, rest);
1046
- slotAt(idx, 2, decs.start); slotAt(idx, 3, decs.len);
1043
+ f0At(idx, decs.len);
1044
+ slotAt(idx, 0, decs.start);
1045
+ slotAt(idx, 1, r.start); slotAt(idx, 2, r.len);
1046
+ slotAt(idx, 3, rest);
1047
1047
  slotAt(idx, 4, ta);
1048
1048
  flagsAt(idx, n.optional ? 1 : 0);
1049
1049
  spanAt(idx, asStart(n), asEnd(n));
@@ -1064,10 +1064,10 @@ function encode(program) {
1064
1064
  const ta = n.typeAnnotation == null ? NULL : encNode(n.typeAnnotation);
1065
1065
  const idx = alloc();
1066
1066
  tagAt(idx, 72);
1067
- f0At(idx, r.len);
1068
- slotAt(idx, 0, r.start);
1069
- slotAt(idx, 1, rest);
1070
- slotAt(idx, 2, decs.start); slotAt(idx, 3, decs.len);
1067
+ f0At(idx, decs.len);
1068
+ slotAt(idx, 0, decs.start);
1069
+ slotAt(idx, 1, r.start); slotAt(idx, 2, r.len);
1070
+ slotAt(idx, 3, rest);
1071
1071
  slotAt(idx, 4, ta);
1072
1072
  flagsAt(idx, n.optional ? 1 : 0);
1073
1073
  spanAt(idx, asStart(n), asEnd(n));
@@ -1973,14 +1973,14 @@ function encode(program) {
1973
1973
  }
1974
1974
  function enc_jsx_opening_element(n) {
1975
1975
  const c_name = n.name == null ? NULL : encNode(n.name);
1976
- const c_attributes = encArr(n.attributes, encNode);
1977
1976
  const c_type_arguments = n.typeArguments == null ? NULL : encNode(n.typeArguments);
1977
+ const c_attributes = encArr(n.attributes, encNode);
1978
1978
  const idx = alloc();
1979
1979
  tagAt(idx, 157);
1980
1980
  slotAt(idx, 0, c_name);
1981
+ slotAt(idx, 1, c_type_arguments);
1981
1982
  f0At(idx, c_attributes.len);
1982
- slotAt(idx, 1, c_attributes.start);
1983
- slotAt(idx, 2, c_type_arguments);
1983
+ slotAt(idx, 2, c_attributes.start);
1984
1984
  flagsAt(idx, 0 | (n.selfClosing ? 1 : 0));
1985
1985
  spanAt(idx, asStart(n), asEnd(n));
1986
1986
  recordComments(n, idx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuku-codegen",
3
- "version": "0.5.46",
3
+ "version": "0.5.48",
4
4
  "description": "High-performance JavaScript/TypeScript code generator written in Zig",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,17 +17,17 @@
17
17
  "encode.js"
18
18
  ],
19
19
  "optionalDependencies": {
20
- "@yuku-codegen/binding-linux-x64-gnu": "0.5.46",
21
- "@yuku-codegen/binding-linux-arm64-gnu": "0.5.46",
22
- "@yuku-codegen/binding-linux-arm-gnu": "0.5.46",
23
- "@yuku-codegen/binding-linux-x64-musl": "0.5.46",
24
- "@yuku-codegen/binding-linux-arm64-musl": "0.5.46",
25
- "@yuku-codegen/binding-linux-arm-musl": "0.5.46",
26
- "@yuku-codegen/binding-darwin-x64": "0.5.46",
27
- "@yuku-codegen/binding-darwin-arm64": "0.5.46",
28
- "@yuku-codegen/binding-win32-x64": "0.5.46",
29
- "@yuku-codegen/binding-win32-arm64": "0.5.46",
30
- "@yuku-codegen/binding-freebsd-x64": "0.5.46"
20
+ "@yuku-codegen/binding-linux-x64-gnu": "0.5.48",
21
+ "@yuku-codegen/binding-linux-arm64-gnu": "0.5.48",
22
+ "@yuku-codegen/binding-linux-arm-gnu": "0.5.48",
23
+ "@yuku-codegen/binding-linux-x64-musl": "0.5.48",
24
+ "@yuku-codegen/binding-linux-arm64-musl": "0.5.48",
25
+ "@yuku-codegen/binding-linux-arm-musl": "0.5.48",
26
+ "@yuku-codegen/binding-darwin-x64": "0.5.48",
27
+ "@yuku-codegen/binding-darwin-arm64": "0.5.48",
28
+ "@yuku-codegen/binding-win32-x64": "0.5.48",
29
+ "@yuku-codegen/binding-win32-arm64": "0.5.48",
30
+ "@yuku-codegen/binding-freebsd-x64": "0.5.48"
31
31
  },
32
32
  "keywords": [
33
33
  "ast",