bq2cst 0.5.10 → 0.5.12

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/bq2cst.d.ts CHANGED
@@ -8,6 +8,7 @@ export type UnknownNode =
8
8
  | AccessOperator
9
9
  | AddColumnClause
10
10
  | AddConstraintClause
11
+ | AggregatePipeOperator
11
12
  | AlterBICapacityStatement
12
13
  | AlterColumnStatement
13
14
  | AlterModelStatement
@@ -17,10 +18,12 @@ export type UnknownNode =
17
18
  | AlterSchemaStatement
18
19
  | AlterTableDropClause
19
20
  | AlterTableStatement
21
+ | AlterVectorIndexStatement
20
22
  | AlterViewStatement
21
23
  | ArrayLiteral
22
24
  | AssertStatement
23
25
  | Asterisk
26
+ | BasePipeOperator
24
27
  | BinaryOperator
25
28
  | BeginStatement
26
29
  | BetweenOperator
@@ -61,11 +64,14 @@ export type UnknownNode =
61
64
  | ExtractArgument
62
65
  | ForStatement
63
66
  | ForSystemTimeAsOfClause
67
+ | FromStatement
68
+ | FunctionChain
64
69
  | GrantStatement
65
70
  | GroupByExprs
66
71
  | GroupedExpr
67
72
  | GroupedExprs
68
73
  | GroupedIdentWithOptions
74
+ | GroupedPattern
69
75
  | GroupedStatement
70
76
  | GroupedTypeDeclarationOrConstraints
71
77
  | GroupedType
@@ -77,6 +83,7 @@ export type UnknownNode =
77
83
  | IntervalLiteral
78
84
  | IsDistinctFromOperator
79
85
  | JoinOperator
86
+ | JoinPipeOperator
80
87
  | Keyword
81
88
  | KeywordSequence
82
89
  | KeywordWithExpr
@@ -86,16 +93,26 @@ export type UnknownNode =
86
93
  | KeywordWithStatements
87
94
  | KeywordWithType
88
95
  | LimitClause
96
+ | LimitPipeOperator
89
97
  | LoadStatement
90
98
  | LoopStatement
99
+ | MatchRecognizeClause
100
+ | MatchRecognizeConfig
101
+ | MatchRecognizePipeOperator
91
102
  | MergeStatement
92
103
  | MultiTokenIdentifier
93
104
  | NullLiteral
94
105
  | NumericLiteral
106
+ | OrPattern
95
107
  | OverClause
96
108
  | OverwritePartitionsClause
97
109
  | Parameter
110
+ | Pattern
111
+ | PatternClause
112
+ | PatternQuantifier
113
+ | PipeStatement
98
114
  | PivotOperator
115
+ | PivotPipeOperator
99
116
  | PivotConfig
100
117
  | RaiseStatement
101
118
  | RangeLiteral
@@ -103,6 +120,7 @@ export type UnknownNode =
103
120
  | RepeatStatement
104
121
  | RevokeStatement
105
122
  | SelectStatement
123
+ | SelectPipeOperator
106
124
  | SetOperator
107
125
  | SetStatement
108
126
  | SingleTokenStatement
@@ -110,6 +128,7 @@ export type UnknownNode =
110
128
  | StructLiteral
111
129
  | Symbol_
112
130
  | TableSampleClause
131
+ | TableSamplePipeOperator
113
132
  | TableSampleRatio
114
133
  | Template
115
134
  | TransactionStatement
@@ -119,7 +138,9 @@ export type UnknownNode =
119
138
  | TypeDeclaration
120
139
  | UnaryOperator
121
140
  | UndropStatement
141
+ | UnionPipeOperator
122
142
  | UnpivotConfig
143
+ | UnpivotPipeOperator
123
144
  | UnpivotOperator
124
145
  | UpdateStatement
125
146
  | WhenClause
@@ -130,6 +151,7 @@ export type UnknownNode =
130
151
  | WindowSpecification
131
152
  | WithClause
132
153
  | WithOffsetClause
154
+ | WithPipeOperator
133
155
  | WithPartitionColumnsClause
134
156
  | WithQuery
135
157
  | XXXByExprs;
@@ -183,6 +205,7 @@ export type FromItemExpr = Expr & {
183
205
  with_offset: NodeChild;
184
206
  pivot?: NodeChild;
185
207
  unpivot?: NodeChild;
208
+ match_recognize?: NodeChild;
186
209
  };
187
210
  };
188
211
 
@@ -202,17 +225,6 @@ export type IdentifierGeneral = FromItemExpr & {
202
225
  };
203
226
  };
204
227
 
205
- export type IdentWithOptions = Expr & {
206
- node_type: "IdentWithOptions";
207
- children: {
208
- as: undefined;
209
- alias: undefined;
210
- order: undefined;
211
- null_order: undefined;
212
- options?: NodeChild;
213
- };
214
- };
215
-
216
228
  export type XXXStatement = BaseNode & {
217
229
  token: Token;
218
230
  children: {
@@ -220,6 +232,14 @@ export type XXXStatement = BaseNode & {
220
232
  };
221
233
  };
222
234
 
235
+ export type PipeOperator = BaseNode & {
236
+ children: {
237
+ keywords?: NodeChild;
238
+ exprs?: NodeVecChild;
239
+ };
240
+ }
241
+
242
+ // ----- sub types of BaseNode (concrete) -----
223
243
  export type AddColumnClause = BaseNode & {
224
244
  node_type: "AddColumnClause";
225
245
  children: {
@@ -238,7 +258,13 @@ export type AddConstraintClause = BaseNode & {
238
258
  };
239
259
  };
240
260
 
241
- // ----- sub types of BaseNode (concrete) -----
261
+ export type AggregatePipeOperator = PipeOperator & {
262
+ node_type: "AggregatePipeOperator";
263
+ children: {
264
+ groupby?: NodeChild;
265
+ }
266
+ }
267
+
242
268
  export type AlterBICapacityStatement = XXXStatement & {
243
269
  node_type: "AlterBICapacityStatement";
244
270
  children: {
@@ -314,7 +340,9 @@ export type AlterSchemaStatement = XXXStatement & {
314
340
  what: NodeChild;
315
341
  if_exists?: NodeVecChild;
316
342
  ident: NodeChild;
317
- set: NodeChild;
343
+ set?: NodeChild;
344
+ add?: NodeChild;
345
+ drop?: NodeChild;
318
346
  default_collate?: NodeChild;
319
347
  options?: NodeChild;
320
348
  };
@@ -356,6 +384,17 @@ export type AlterTableStatement = XXXStatement & {
356
384
  };
357
385
  };
358
386
 
387
+ export type AlterVectorIndexStatement = XXXStatement & {
388
+ node_type: "AlterVectorIndexStatement";
389
+ children: {
390
+ what: NodeChild;
391
+ if_exists?: NodeVecChild;
392
+ ident: NodeChild;
393
+ on: NodeChild;
394
+ operation: NodeChild;
395
+ };
396
+ };
397
+
359
398
  export type AlterViewStatement = XXXStatement & {
360
399
  node_type: "AlterViewStatement";
361
400
  children: {
@@ -409,6 +448,10 @@ export type Asterisk = Expr & {
409
448
  };
410
449
  };
411
450
 
451
+ export type BasePipeOperator = PipeOperator & {
452
+ node_type: "BasePipeOperator";
453
+ }
454
+
412
455
  export type BinaryOperator = Expr & {
413
456
  node_type: "BinaryOperator";
414
457
  children: {
@@ -577,6 +620,7 @@ export type CreateFunctionStatement = XXXStatement & {
577
620
  group: NodeChild;
578
621
  returns?: NodeChild;
579
622
  remote?: NodeChild;
623
+ connection?: NodeChild;
580
624
  determinism?: NodeVecChild;
581
625
  language?: NodeChild;
582
626
  options?: NodeChild;
@@ -669,6 +713,7 @@ export type CreateIndexStatement = XXXStatement & {
669
713
  tablename: NodeChild;
670
714
  column_group: NodeChild;
671
715
  storing?: NodeChild;
716
+ partitionby?: NodeChild;
672
717
  options?: NodeChild;
673
718
  };
674
719
  };
@@ -855,6 +900,21 @@ export type ForSystemTimeAsOfClause = BaseNode & {
855
900
  };
856
901
  };
857
902
 
903
+ export type FromStatement = XXXStatement & {
904
+ node_type: "FromStatement";
905
+ children: {
906
+ expr: NodeChild;
907
+ };
908
+ }
909
+
910
+ export type FunctionChain = FromItemExpr & {
911
+ node_type: "FunctionChain";
912
+ children: {
913
+ left: NodeChild;
914
+ right: NodeChild;
915
+ };
916
+ }
917
+
858
918
  export type GrantStatement = XXXStatement & {
859
919
  node_type: "GrantStatement";
860
920
  children: {
@@ -907,6 +967,16 @@ export type GroupedIdentWithOptions = BaseNode & {
907
967
  };
908
968
  };
909
969
 
970
+ export type GroupedPattern = BaseNode & {
971
+ token: Token;
972
+ node_type: "GroupedPattern";
973
+ children: {
974
+ patterns: NodeVecChild;
975
+ rparen: NodeChild;
976
+ suffixes: NodeVecChild;
977
+ };
978
+ };
979
+
910
980
  export type GroupedStatement = FromItemExpr &
911
981
  XXXStatement & {
912
982
  node_type: "GroupedStatement";
@@ -939,6 +1009,17 @@ export type Identifier = IdentifierGeneral & {
939
1009
  node_type: "Identifier";
940
1010
  };
941
1011
 
1012
+ export type IdentWithOptions = Expr & {
1013
+ node_type: "IdentWithOptions";
1014
+ children: {
1015
+ as: undefined;
1016
+ alias: undefined;
1017
+ order: undefined;
1018
+ null_order: undefined;
1019
+ options?: NodeChild;
1020
+ };
1021
+ };
1022
+
942
1023
  export type IfStatement = XXXStatement & {
943
1024
  node_type: "IfStatement";
944
1025
  children: {
@@ -1007,6 +1088,15 @@ export type JoinOperator = FromItemExpr & {
1007
1088
  };
1008
1089
  };
1009
1090
 
1091
+ export type JoinPipeOperator = PipeOperator & {
1092
+ node_type: "JoinPipeOperator";
1093
+ children: {
1094
+ method?: NodeChild;
1095
+ on?: NodeChild;
1096
+ using?: NodeChild;
1097
+ }
1098
+ }
1099
+
1010
1100
  export type Keyword = BaseNode & {
1011
1101
  token: Token;
1012
1102
  node_type: "Keyword";
@@ -1015,7 +1105,7 @@ export type Keyword = BaseNode & {
1015
1105
  export type KeywordSequence = BaseNode & {
1016
1106
  node_type: "KeywordSequence";
1017
1107
  children: {
1018
- next_keyword: { Node: Keyword | KeywordSequence | KeywordWithExpr };
1108
+ next_keyword: { Node: Keyword | KeywordSequence | KeywordWithExpr | KeywordWithGroupedXXX };
1019
1109
  };
1020
1110
  };
1021
1111
 
@@ -1069,6 +1159,44 @@ export type LimitClause = BaseNode & {
1069
1159
  };
1070
1160
  };
1071
1161
 
1162
+ export type LimitPipeOperator = PipeOperator & {
1163
+ node_type: "LimitPipeOperator";
1164
+ children: {
1165
+ offset?: NodeChild;
1166
+ }
1167
+ }
1168
+
1169
+ export type MatchRecognizeClause = BaseNode & {
1170
+ token: Token;
1171
+ node_type: "MatchRecognizeClause";
1172
+ children: {
1173
+ as?: NodeChild;
1174
+ alias?: NodeChild;
1175
+ config: NodeChild;
1176
+ };
1177
+ };
1178
+
1179
+ export type MatchRecognizeConfig = BaseNode & {
1180
+ token: Token;
1181
+ node_type: "MatchRecognizeConfig";
1182
+ children: {
1183
+ partitionby?: NodeChild;
1184
+ orderby?: NodeChild;
1185
+ measures?: NodeChild;
1186
+ skip_rule?: NodeChild;
1187
+ pattern: NodeChild;
1188
+ define?: NodeChild;
1189
+ options?: NodeChild;
1190
+ rparen: NodeChild;
1191
+ };
1192
+ };
1193
+
1194
+ export type MatchRecognizePipeOperator = BaseNode & {
1195
+ token: Token;
1196
+ node_type: "MatchRecognizePipeOperator";
1197
+ children: MatchRecognizeClause["children"];
1198
+ };
1199
+
1072
1200
  export type LoopStatement = LabelableStatement & {
1073
1201
  node_type: "LoopStatement";
1074
1202
  children: {
@@ -1124,6 +1252,16 @@ export type NumericLiteral = Expr & {
1124
1252
  node_type: "NumericLiteral";
1125
1253
  };
1126
1254
 
1255
+ export type OrPattern = BaseNode & {
1256
+ token: Token;
1257
+ node_type: "OrPattern";
1258
+ children: {
1259
+ left: NodeVecChild;
1260
+ right: NodeVecChild;
1261
+ };
1262
+ };
1263
+
1264
+
1127
1265
  export type OverClause = BaseNode & {
1128
1266
  token: Token;
1129
1267
  node_type: "OverClause";
@@ -1145,6 +1283,51 @@ export type Parameter = IdentifierGeneral & {
1145
1283
  node_type: "Parameter";
1146
1284
  };
1147
1285
 
1286
+ export type Pattern = BaseNode & {
1287
+ token: Token;
1288
+ node_type: "Pattern";
1289
+ children: {
1290
+ suffixes: NodeVecChild;
1291
+ }
1292
+ };
1293
+
1294
+ export type PatternClause = BaseNode & {
1295
+ token: Token;
1296
+ node_type: "PatternClause";
1297
+ children: {
1298
+ pattern: NodeChild;
1299
+ }
1300
+ };
1301
+
1302
+ export type PatternQuantifier = BaseNode & {
1303
+ token: Token;
1304
+ node_type: "PatternQuantifier";
1305
+ children: {
1306
+ min?: NodeChild;
1307
+ comma?: NodeChild;
1308
+ max?: NodeChild;
1309
+ rbrace: NodeChild;
1310
+ }
1311
+ };
1312
+
1313
+ export type PipeStatement = XXXStatement & {
1314
+ node_type: "PipeStatement";
1315
+ children: {
1316
+ left: NodeChild;
1317
+ right: NodeChild;
1318
+ };
1319
+ }
1320
+
1321
+ export type PivotPipeOperator = PipeOperator & {
1322
+ node_type: "PivotPipeOperator";
1323
+ children: {
1324
+ exprs: undefined;
1325
+ config: NodeChild;
1326
+ as?: NodeChild;
1327
+ alias?: NodeChild;
1328
+ }
1329
+ }
1330
+
1148
1331
  export type PivotOperator = BaseNode & {
1149
1332
  token: Token;
1150
1333
  node_type: "PivotOperator";
@@ -1232,10 +1415,21 @@ export type SelectStatement = XXXStatement & {
1232
1415
  };
1233
1416
  };
1234
1417
 
1418
+ export type SelectPipeOperator = PipeOperator & {
1419
+ node_type: "SelectPipeOperator";
1420
+ children: {
1421
+ window?: NodeChild;
1422
+ };
1423
+ }
1424
+
1425
+
1235
1426
  export type SetOperator = XXXStatement & {
1236
1427
  node_type: "SetOperator";
1237
1428
  children: {
1238
1429
  with?: { Node: WithClause };
1430
+ method?: NodeChild;
1431
+ by?: NodeChild;
1432
+ corresponding?: NodeChild;
1239
1433
  distinct_or_all: NodeChild;
1240
1434
  left: { Node: SetOperator | SelectStatement | GroupedStatement };
1241
1435
  right: { Node: SetOperator | SelectStatement | GroupedStatement };
@@ -1280,6 +1474,14 @@ export type TableSampleClause = BaseNode & {
1280
1474
  };
1281
1475
  };
1282
1476
 
1477
+ export type TableSamplePipeOperator = PipeOperator & {
1478
+ node_type: "TableSamplePipeOperator";
1479
+ children: {
1480
+ exprs: undefined;
1481
+ group?: NodeChild;
1482
+ }
1483
+ }
1484
+
1283
1485
  export type TableSampleRatio = BaseNode & {
1284
1486
  token: Token;
1285
1487
  node_type: "TableSampleRatio";
@@ -1364,6 +1566,15 @@ export type UndropStatement = XXXStatement & {
1364
1566
  };
1365
1567
  };
1366
1568
 
1569
+ export type UnionPipeOperator = PipeOperator & {
1570
+ node_type: "UnionPipeOperator";
1571
+ children: {
1572
+ method?: NodeChild;
1573
+ by?: NodeChild;
1574
+ corresponding?: NodeChild;
1575
+ }
1576
+ }
1577
+
1367
1578
  export type UnpivotConfig = BaseNode & {
1368
1579
  token: Token;
1369
1580
  node_type: "UnpivotConfig";
@@ -1375,6 +1586,16 @@ export type UnpivotConfig = BaseNode & {
1375
1586
  };
1376
1587
  };
1377
1588
 
1589
+ export type UnpivotPipeOperator = PipeOperator & {
1590
+ node_type: "UnpivotPipeOperator";
1591
+ children: {
1592
+ exprs: undefined;
1593
+ config: NodeChild;
1594
+ as?: NodeChild;
1595
+ alias?: NodeChild;
1596
+ }
1597
+ }
1598
+
1378
1599
  export type UnpivotOperator = BaseNode & {
1379
1600
  token: Token;
1380
1601
  node_type: "UnpivotOperator";
@@ -1476,6 +1697,12 @@ export type WithOffsetClause = BaseNode & {
1476
1697
  };
1477
1698
  };
1478
1699
 
1700
+ export type WithPipeOperator = BaseNode & {
1701
+ token: Token;
1702
+ node_type: "WithPipeOperator";
1703
+ children: WithClause["children"];
1704
+ };
1705
+
1479
1706
  export type WithPartitionColumnsClause = BaseNode & {
1480
1707
  token: Token;
1481
1708
  node_type: "WithPartitionColumnsClause";
package/bq2cst.js CHANGED
@@ -4,35 +4,6 @@ imports['__wbindgen_placeholder__'] = module.exports;
4
4
  let wasm;
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
- const heap = new Array(128).fill(undefined);
8
-
9
- heap.push(undefined, null, true, false);
10
-
11
- function getObject(idx) { return heap[idx]; }
12
-
13
- let heap_next = heap.length;
14
-
15
- function dropObject(idx) {
16
- if (idx < 132) return;
17
- heap[idx] = heap_next;
18
- heap_next = idx;
19
- }
20
-
21
- function takeObject(idx) {
22
- const ret = getObject(idx);
23
- dropObject(idx);
24
- return ret;
25
- }
26
-
27
- function addHeapObject(obj) {
28
- if (heap_next === heap.length) heap.push(heap.length + 1);
29
- const idx = heap_next;
30
- heap_next = heap[idx];
31
-
32
- heap[idx] = obj;
33
- return idx;
34
- }
35
-
36
7
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
37
8
 
38
9
  cachedTextDecoder.decode();
@@ -51,6 +22,71 @@ function getStringFromWasm0(ptr, len) {
51
22
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
52
23
  }
53
24
 
25
+ let WASM_VECTOR_LEN = 0;
26
+
27
+ let cachedTextEncoder = new TextEncoder('utf-8');
28
+
29
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
30
+ ? function (arg, view) {
31
+ return cachedTextEncoder.encodeInto(arg, view);
32
+ }
33
+ : function (arg, view) {
34
+ const buf = cachedTextEncoder.encode(arg);
35
+ view.set(buf);
36
+ return {
37
+ read: arg.length,
38
+ written: buf.length
39
+ };
40
+ });
41
+
42
+ function passStringToWasm0(arg, malloc, realloc) {
43
+
44
+ if (realloc === undefined) {
45
+ const buf = cachedTextEncoder.encode(arg);
46
+ const ptr = malloc(buf.length, 1) >>> 0;
47
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
48
+ WASM_VECTOR_LEN = buf.length;
49
+ return ptr;
50
+ }
51
+
52
+ let len = arg.length;
53
+ let ptr = malloc(len, 1) >>> 0;
54
+
55
+ const mem = getUint8ArrayMemory0();
56
+
57
+ let offset = 0;
58
+
59
+ for (; offset < len; offset++) {
60
+ const code = arg.charCodeAt(offset);
61
+ if (code > 0x7F) break;
62
+ mem[ptr + offset] = code;
63
+ }
64
+
65
+ if (offset !== len) {
66
+ if (offset !== 0) {
67
+ arg = arg.slice(offset);
68
+ }
69
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
70
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
71
+ const ret = encodeString(arg, view);
72
+
73
+ offset += ret.written;
74
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
75
+ }
76
+
77
+ WASM_VECTOR_LEN = offset;
78
+ return ptr;
79
+ }
80
+
81
+ let cachedDataViewMemory0 = null;
82
+
83
+ function getDataViewMemory0() {
84
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
85
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
86
+ }
87
+ return cachedDataViewMemory0;
88
+ }
89
+
54
90
  function debugString(val) {
55
91
  // primitive types
56
92
  const type = typeof val;
@@ -92,7 +128,7 @@ function debugString(val) {
92
128
  // Test for built-in
93
129
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
94
130
  let className;
95
- if (builtInMatches.length > 1) {
131
+ if (builtInMatches && builtInMatches.length > 1) {
96
132
  className = builtInMatches[1];
97
133
  } else {
98
134
  // Failed to match the standard '[object ClassName]'
@@ -116,212 +152,139 @@ function debugString(val) {
116
152
  return className;
117
153
  }
118
154
 
119
- let WASM_VECTOR_LEN = 0;
120
-
121
- let cachedTextEncoder = new TextEncoder('utf-8');
122
-
123
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
124
- ? function (arg, view) {
125
- return cachedTextEncoder.encodeInto(arg, view);
126
- }
127
- : function (arg, view) {
128
- const buf = cachedTextEncoder.encode(arg);
129
- view.set(buf);
130
- return {
131
- read: arg.length,
132
- written: buf.length
133
- };
134
- });
135
-
136
- function passStringToWasm0(arg, malloc, realloc) {
137
-
138
- if (realloc === undefined) {
139
- const buf = cachedTextEncoder.encode(arg);
140
- const ptr = malloc(buf.length, 1) >>> 0;
141
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
142
- WASM_VECTOR_LEN = buf.length;
143
- return ptr;
144
- }
145
-
146
- let len = arg.length;
147
- let ptr = malloc(len, 1) >>> 0;
148
-
149
- const mem = getUint8ArrayMemory0();
150
-
151
- let offset = 0;
152
-
153
- for (; offset < len; offset++) {
154
- const code = arg.charCodeAt(offset);
155
- if (code > 0x7F) break;
156
- mem[ptr + offset] = code;
157
- }
158
-
159
- if (offset !== len) {
160
- if (offset !== 0) {
161
- arg = arg.slice(offset);
162
- }
163
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
164
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
165
- const ret = encodeString(arg, view);
166
-
167
- offset += ret.written;
168
- ptr = realloc(ptr, len, offset, 1) >>> 0;
169
- }
170
-
171
- WASM_VECTOR_LEN = offset;
172
- return ptr;
173
- }
174
-
175
- let cachedDataViewMemory0 = null;
176
-
177
- function getDataViewMemory0() {
178
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
179
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
180
- }
181
- return cachedDataViewMemory0;
155
+ function takeFromExternrefTable0(idx) {
156
+ const value = wasm.__wbindgen_export_3.get(idx);
157
+ wasm.__externref_table_dealloc(idx);
158
+ return value;
182
159
  }
183
160
  /**
184
- * @param {string} code
185
- * @returns {any}
186
- */
161
+ * @param {string} code
162
+ * @returns {any}
163
+ */
187
164
  module.exports.parse = function(code) {
188
- try {
189
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
190
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
191
- const len0 = WASM_VECTOR_LEN;
192
- wasm.parse(retptr, ptr0, len0);
193
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
194
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
195
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
196
- if (r2) {
197
- throw takeObject(r1);
198
- }
199
- return takeObject(r0);
200
- } finally {
201
- wasm.__wbindgen_add_to_stack_pointer(16);
165
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
166
+ const len0 = WASM_VECTOR_LEN;
167
+ const ret = wasm.parse(ptr0, len0);
168
+ if (ret[2]) {
169
+ throw takeFromExternrefTable0(ret[1]);
202
170
  }
171
+ return takeFromExternrefTable0(ret[0]);
203
172
  };
204
173
 
205
174
  /**
206
- * @param {string} code
207
- * @returns {any}
208
- */
175
+ * @param {string} code
176
+ * @returns {any}
177
+ */
209
178
  module.exports.tokenize = function(code) {
179
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
180
+ const len0 = WASM_VECTOR_LEN;
181
+ const ret = wasm.tokenize(ptr0, len0);
182
+ if (ret[2]) {
183
+ throw takeFromExternrefTable0(ret[1]);
184
+ }
185
+ return takeFromExternrefTable0(ret[0]);
186
+ };
187
+
188
+ module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
189
+ let deferred0_0;
190
+ let deferred0_1;
210
191
  try {
211
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
212
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
213
- const len0 = WASM_VECTOR_LEN;
214
- wasm.tokenize(retptr, ptr0, len0);
215
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
216
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
217
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
218
- if (r2) {
219
- throw takeObject(r1);
220
- }
221
- return takeObject(r0);
192
+ deferred0_0 = arg0;
193
+ deferred0_1 = arg1;
194
+ console.error(getStringFromWasm0(arg0, arg1));
222
195
  } finally {
223
- wasm.__wbindgen_add_to_stack_pointer(16);
196
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
224
197
  }
225
198
  };
226
199
 
227
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
228
- takeObject(arg0);
200
+ module.exports.__wbg_new_254fa9eac11932ae = function() {
201
+ const ret = new Array();
202
+ return ret;
229
203
  };
230
204
 
231
- module.exports.__wbindgen_as_number = function(arg0) {
232
- const ret = +getObject(arg0);
205
+ module.exports.__wbg_new_688846f374351c92 = function() {
206
+ const ret = new Object();
233
207
  return ret;
234
208
  };
235
209
 
236
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
237
- const ret = getObject(arg0);
238
- return addHeapObject(ret);
210
+ module.exports.__wbg_new_8a6f238a6ece86ea = function() {
211
+ const ret = new Error();
212
+ return ret;
239
213
  };
240
214
 
241
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
242
- const ret = new Error(getStringFromWasm0(arg0, arg1));
243
- return addHeapObject(ret);
215
+ module.exports.__wbg_new_bc96c6a1c0786643 = function() {
216
+ const ret = new Map();
217
+ return ret;
244
218
  };
245
219
 
246
- module.exports.__wbg_new_abda76e883ba8a5f = function() {
247
- const ret = new Error();
248
- return addHeapObject(ret);
220
+ module.exports.__wbg_set_1d80752d0d5f0b21 = function(arg0, arg1, arg2) {
221
+ arg0[arg1 >>> 0] = arg2;
222
+ };
223
+
224
+ module.exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
225
+ arg0[arg1] = arg2;
226
+ };
227
+
228
+ module.exports.__wbg_set_76818dc3c59a63d5 = function(arg0, arg1, arg2) {
229
+ const ret = arg0.set(arg1, arg2);
230
+ return ret;
249
231
  };
250
232
 
251
- module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
252
- const ret = getObject(arg1).stack;
233
+ module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
234
+ const ret = arg1.stack;
253
235
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
254
236
  const len1 = WASM_VECTOR_LEN;
255
237
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
256
238
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
257
239
  };
258
240
 
259
- module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
260
- let deferred0_0;
261
- let deferred0_1;
262
- try {
263
- deferred0_0 = arg0;
264
- deferred0_1 = arg1;
265
- console.error(getStringFromWasm0(arg0, arg1));
266
- } finally {
267
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
268
- }
269
- };
270
-
271
- module.exports.__wbindgen_number_new = function(arg0) {
272
- const ret = arg0;
273
- return addHeapObject(ret);
241
+ module.exports.__wbindgen_as_number = function(arg0) {
242
+ const ret = +arg0;
243
+ return ret;
274
244
  };
275
245
 
276
246
  module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
277
247
  const ret = BigInt.asUintN(64, arg0);
278
- return addHeapObject(ret);
279
- };
280
-
281
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
282
- const ret = getStringFromWasm0(arg0, arg1);
283
- return addHeapObject(ret);
284
- };
285
-
286
- module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
287
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
248
+ return ret;
288
249
  };
289
250
 
290
- module.exports.__wbg_new_a220cf903aa02ca2 = function() {
291
- const ret = new Array();
292
- return addHeapObject(ret);
251
+ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
252
+ const ret = debugString(arg1);
253
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
254
+ const len1 = WASM_VECTOR_LEN;
255
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
256
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
293
257
  };
294
258
 
295
- module.exports.__wbg_new_8608a2b51a5f6737 = function() {
296
- const ret = new Map();
297
- return addHeapObject(ret);
259
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
260
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
261
+ return ret;
298
262
  };
299
263
 
300
- module.exports.__wbg_new_525245e2b9901204 = function() {
301
- const ret = new Object();
302
- return addHeapObject(ret);
264
+ module.exports.__wbindgen_init_externref_table = function() {
265
+ const table = wasm.__wbindgen_export_3;
266
+ const offset = table.grow(4);
267
+ table.set(0, undefined);
268
+ table.set(offset + 0, undefined);
269
+ table.set(offset + 1, null);
270
+ table.set(offset + 2, true);
271
+ table.set(offset + 3, false);
272
+ ;
303
273
  };
304
274
 
305
275
  module.exports.__wbindgen_is_string = function(arg0) {
306
- const ret = typeof(getObject(arg0)) === 'string';
276
+ const ret = typeof(arg0) === 'string';
307
277
  return ret;
308
278
  };
309
279
 
310
- module.exports.__wbg_set_673dda6c73d19609 = function(arg0, arg1, arg2) {
311
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
312
- };
313
-
314
- module.exports.__wbg_set_49185437f0ab06f8 = function(arg0, arg1, arg2) {
315
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
316
- return addHeapObject(ret);
280
+ module.exports.__wbindgen_number_new = function(arg0) {
281
+ const ret = arg0;
282
+ return ret;
317
283
  };
318
284
 
319
- module.exports.__wbindgen_debug_string = function(arg0, arg1) {
320
- const ret = debugString(getObject(arg1));
321
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
- const len1 = WASM_VECTOR_LEN;
323
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
324
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
285
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
286
+ const ret = getStringFromWasm0(arg0, arg1);
287
+ return ret;
325
288
  };
326
289
 
327
290
  module.exports.__wbindgen_throw = function(arg0, arg1) {
@@ -336,3 +299,5 @@ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
336
299
  wasm = wasmInstance.exports;
337
300
  module.exports.__wasm = wasm;
338
301
 
302
+ wasm.__wbindgen_start();
303
+
package/bq2cst_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "kitta65 <kitta65kitta@gmail.com>"
5
5
  ],
6
- "version": "0.5.10",
6
+ "version": "0.5.12",
7
7
  "license": "MIT",
8
8
  "files": [
9
9
  "bq2cst_bg.wasm",