Coverage Report

Created: 2025-09-04 06:38

/src/moddable/xs/sources/xsTree.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2016-2017  Moddable Tech, Inc.
3
 *
4
 *   This file is part of the Moddable SDK Runtime.
5
 * 
6
 *   The Moddable SDK Runtime is free software: you can redistribute it and/or modify
7
 *   it under the terms of the GNU Lesser General Public License as published by
8
 *   the Free Software Foundation, either version 3 of the License, or
9
 *   (at your option) any later version.
10
 * 
11
 *   The Moddable SDK Runtime is distributed in the hope that it will be useful,
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *   GNU Lesser General Public License for more details.
15
 * 
16
 *   You should have received a copy of the GNU Lesser General Public License
17
 *   along with the Moddable SDK Runtime.  If not, see <http://www.gnu.org/licenses/>.
18
 *
19
 * This file incorporates work covered by the following copyright and  
20
 * permission notice:  
21
 *
22
 *       Copyright (C) 2010-2016 Marvell International Ltd.
23
 *       Copyright (C) 2002-2010 Kinoma, Inc.
24
 *
25
 *       Licensed under the Apache License, Version 2.0 (the "License");
26
 *       you may not use this file except in compliance with the License.
27
 *       You may obtain a copy of the License at
28
 *
29
 *        http://www.apache.org/licenses/LICENSE-2.0
30
 *
31
 *       Unless required by applicable law or agreed to in writing, software
32
 *       distributed under the License is distributed on an "AS IS" BASIS,
33
 *       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34
 *       See the License for the specific language governing permissions and
35
 *       limitations under the License.
36
 */
37
38
#include "xsScript.h"
39
40
//#define mxTreePrint 1
41
42
#ifdef mxTreePrint
43
typedef struct {
44
  txInteger tabs;
45
} txPrinter;
46
#endif
47
48
static void fxNodeDistribute(void* it, txNodeCall call, void* param);
49
50
static void fxCheckFunction(txParser* parser);
51
static void fxCheckGenerator(txParser* parser);
52
static void fxSkipShebang(txParser* parser);
53
54
static void fxArrayNodeDistribute(void* it, txNodeCall call, void* param);
55
static void fxArrayBindingNodeDistribute(void* it, txNodeCall call, void* param);
56
static void fxAssignNodeDistribute(void* it, txNodeCall call, void* param);
57
static void fxBinaryExpressionNodeDistribute(void* it, txNodeCall call, void* param);
58
static void fxBindingNodeDistribute(void* it, txNodeCall call, void* param);
59
static void fxBlockNodeDistribute(void* it, txNodeCall call, void* param);
60
static void fxBodyNodeDistribute(void* it, txNodeCall call, void* param);
61
static void fxCallNewNodeDistribute(void* it, txNodeCall call, void* param);
62
static void fxCaseNodeDistribute(void* it, txNodeCall call, void* param);
63
static void fxCatchNodeDistribute(void* it, txNodeCall call, void* param);
64
static void fxClassNodeDistribute(void* it, txNodeCall call, void* param);
65
static void fxDeleteNodeDistribute(void* it, txNodeCall call, void* param);
66
static void fxDoNodeDistribute(void* it, txNodeCall call, void* param);
67
static void fxExportNodeDistribute(void* it, txNodeCall call, void* param);
68
static void fxExpressionsNodeDistribute(void* it, txNodeCall call, void* param);
69
static void fxFieldNodeDistribute(void* it, txNodeCall call, void* param);
70
static void fxFunctionNodeDistribute(void* it, txNodeCall call, void* param);
71
static void fxForNodeDistribute(void* it, txNodeCall call, void* param);
72
static void fxForInForOfNodeDistribute(void* it, txNodeCall call, void* param);
73
static void fxIfNodeDistribute(void* it, txNodeCall call, void* param);
74
static void fxImportNodeDistribute(void* it, txNodeCall call, void* param);
75
static void fxImportCallNodeDistribute(void* it, txNodeCall call, void* param);
76
static void fxIncludeNodeDistribute(void* it, txNodeCall call, void* param);
77
static void fxLabelNodeDistribute(void* it, txNodeCall call, void* param);
78
static void fxMemberNodeDistribute(void* it, txNodeCall call, void* param);
79
static void fxMemberAtNodeDistribute(void* it, txNodeCall call, void* param);
80
static void fxModuleNodeDistribute(void* it, txNodeCall call, void* param);
81
static void fxObjectNodeDistribute(void* it, txNodeCall call, void* param);
82
static void fxObjectBindingNodeDistribute(void* it, txNodeCall call, void* param);
83
static void fxParamsNodeDistribute(void* it, txNodeCall call, void* param);
84
static void fxParamsBindingNodeDistribute(void* it, txNodeCall call, void* param);
85
static void fxPostfixExpressionNodeDistribute(void* it, txNodeCall call, void* param);
86
static void fxProgramNodeDistribute(void* it, txNodeCall call, void* param);
87
static void fxPropertyNodeDistribute(void* it, txNodeCall call, void* param);
88
static void fxPropertyAtNodeDistribute(void* it, txNodeCall call, void* param);
89
static void fxPropertyBindingNodeDistribute(void* it, txNodeCall call, void* param);
90
static void fxPropertyBindingAtNodeDistribute(void* it, txNodeCall call, void* param);
91
static void fxQuestionMarkNodeDistribute(void* it, txNodeCall call, void* param);
92
static void fxRegexpNodeDistribute(void* it, txNodeCall call, void* param);
93
static void fxRestBindingNodeDistribute(void* it, txNodeCall call, void* param);
94
static void fxReturnNodeDistribute(void* it, txNodeCall call, void* param);
95
static void fxSpreadNodeDistribute(void* it, txNodeCall call, void* param);
96
static void fxStatementNodeDistribute(void* it, txNodeCall call, void* param);
97
static void fxStatementsNodeDistribute(void* it, txNodeCall call, void* param);
98
static void fxSuperNodeDistribute(void* it, txNodeCall call, void* param);
99
static void fxSwitchNodeDistribute(void* it, txNodeCall call, void* param);
100
static void fxTemplateNodeDistribute(void* it, txNodeCall call, void* param);
101
static void fxTryNodeDistribute(void* it, txNodeCall call, void* param);
102
static void fxUnaryExpressionNodeDistribute(void* it, txNodeCall call, void* param);
103
static void fxWhileNodeDistribute(void* it, txNodeCall call, void* param);
104
static void fxWithNodeDistribute(void* it, txNodeCall call, void* param);
105
106
#ifdef mxTreePrint
107
static void fxTreePrint(txParser* parser, txNode* node);
108
109
static void fxNodePrintNode(void* it);
110
static void fxNodePrintTree(void* it, void* param);
111
112
static void fxAccessNodePrintNode(void* it);
113
static void fxDeclareDefineNodePrintNode(void* it);
114
static void fxExportNodePrintNode(void* it);
115
static void fxFunctionNodePrintNode(void* it);
116
static void fxImportNodePrintNode(void* it);
117
static void fxIntegerNodePrintNode(void* it);
118
static void fxLabelNodePrintNode(void* it);
119
static void fxMemberNodePrintNode(void* it);
120
static void fxNumberNodePrintNode(void* it);
121
static void fxPropertyNodePrintNode(void* it);
122
static void fxPropertyBindingNodePrintNode(void* it);
123
static void fxSpecifierNodePrintNode(void* it);
124
static void fxStringNodePrintNode(void* it);
125
#endif
126
127
void fxIncludeTree(txParser* parser, void* stream, txGetter getter, txUnsigned flags, txString path)
128
0
{
129
0
  txParserJump jump;
130
0
  txSymbol* symbol = parser->path;
131
0
  jump.nextJump = parser->firstJump;
132
0
  parser->firstJump = &jump;
133
0
  if (c_setjmp(jump.jmp_buf) == 0) {
134
0
    parser->path = fxNewParserSymbol(parser, path);
135
0
    fxParserTree(parser, stream, getter, flags, C_NULL);
136
0
  }
137
0
  parser->firstJump = jump.nextJump;
138
0
  parser->path = symbol;
139
0
}
140
141
void fxCheckFunction(txParser* parser)
142
100k
{
143
100k
  txNode* node = parser->root;
144
100k
  if (node->description->token == XS_TOKEN_PROGRAM) {
145
100k
    node = ((txProgramNode*)node)->body;
146
100k
    if (node->description->token == XS_TOKEN_STATEMENT) {
147
100k
      node = ((txStatementNode*)node)->expression;
148
100k
      if (node->description->token == XS_TOKEN_EXPRESSIONS) {
149
100k
        txNodeList* list = ((txExpressionsNode*)node)->items;
150
100k
        if (list->length == 1) {
151
100k
          node = list->first;
152
100k
          if (node->description->token == XS_TOKEN_FUNCTION)
153
100k
            return;
154
100k
        }
155
100k
      }
156
100k
    }
157
100k
  }
158
0
  fxReportParserError(parser, node->line, "no function");
159
0
}
160
161
void fxCheckGenerator(txParser* parser)
162
53
{
163
53
  txNode* node = parser->root;
164
53
  if (node->description->token == XS_TOKEN_PROGRAM) {
165
53
    node = ((txProgramNode*)node)->body;
166
53
    if (node->description->token == XS_TOKEN_STATEMENT) {
167
53
      node = ((txStatementNode*)node)->expression;
168
53
      if (node->description->token == XS_TOKEN_EXPRESSIONS) {
169
53
        txNodeList* list = ((txExpressionsNode*)node)->items;
170
53
        if (list->length == 1) {
171
53
          node = list->first;
172
53
          if (node->description->token == XS_TOKEN_GENERATOR)
173
53
            return;
174
53
        }
175
53
      }
176
53
    }
177
53
  }
178
0
  fxReportParserError(parser, node->line, "no generator function");
179
0
}
180
181
void fxSkipShebang(txParser* parser)
182
909k
{
183
909k
  if (parser->character == '#') {
184
2.35k
    fxGetNextCharacter(parser);
185
2.35k
    if (parser->character == '!') {
186
35
      fxGetNextCharacter(parser);
187
890
      while ((parser->character != (txU4)C_EOF) && (parser->character != 10) && (parser->character != 13) && (parser->character != 0x2028) && (parser->character != 0x2029)) {
188
855
        fxGetNextCharacter(parser);
189
855
      }  
190
35
    }
191
2.31k
    else
192
2.31k
      fxReportParserError(parser, 1, "invalid character %d", parser->character);
193
2.35k
  }
194
909k
}
195
196
void fxParserTree(txParser* parser, void* theStream, txGetter theGetter, txUnsigned flags, txString* name)
197
909k
{
198
909k
  mxTryParser(parser) {
199
909k
    parser->stream = theStream;
200
909k
    parser->getter = theGetter;
201
909k
    parser->flags = flags;
202
203
909k
    parser->states[0].line = 1;
204
909k
    parser->states[0].modifier = parser->emptyString;
205
909k
    parser->states[0].string = parser->emptyString;
206
909k
    parser->states[1].line = 1;
207
909k
    parser->states[1].modifier = parser->emptyString;
208
909k
    parser->states[1].string = parser->emptyString;
209
909k
    parser->states[2].line = 1;
210
909k
    parser->states[2].modifier = parser->emptyString;
211
909k
    parser->states[2].string = parser->emptyString;
212
  
213
909k
    parser->root = NULL;
214
  
215
909k
    parser->flags &= ~(mxEvalFlag | mxFunctionFlag | mxGeneratorFlag | mxJSONModuleFlag);
216
909k
    fxGetNextCharacter(parser);
217
909k
    fxGetNextCharacter(parser);
218
909k
    if (flags & mxProgramFlag) {
219
905k
      fxSkipShebang(parser);
220
905k
      fxGetNextToken(parser);
221
905k
      fxProgram(parser);
222
905k
      if (flags & mxFunctionFlag)
223
100k
        fxCheckFunction(parser);
224
804k
      else if (flags & mxGeneratorFlag)
225
53
        fxCheckGenerator(parser);
226
905k
    }
227
4.51k
    else if (flags & mxJSONModuleFlag) {
228
0
      fxGetNextTokenJSON(parser);
229
0
      fxGetNextTokenJSON(parser);
230
0
      fxJSONModule(parser);
231
0
    }
232
4.51k
    else {
233
4.51k
      parser->flags |= mxStrictFlag | mxAsyncFlag;
234
4.51k
      fxSkipShebang(parser);
235
4.51k
      fxGetNextToken(parser);
236
4.51k
      fxModule(parser);
237
4.51k
    }
238
909k
    parser->flags &= ~mxEvalFlag;
239
  
240
909k
    parser->flags |= flags & mxEvalFlag;
241
  
242
  #ifdef mxTreePrint
243
    fxTreePrint(parser, parser->root);
244
  #endif
245
909k
    if ((parser->errorCount == 0) && name)
246
0
      *name = parser->name;
247
909k
  }
248
909k
  mxCatchParser(parser) {
249
625k
  }
250
909k
}
251
252
void fxNodeListDistribute(txNodeList* list, txNodeCall call, void* param)
253
2.02M
{
254
2.02M
  txNode* item = list->first;
255
5.31M
  while (item) {
256
3.29M
    (*call)(item, param);
257
3.29M
    item = item->next;
258
3.29M
  }
259
2.02M
}
260
261
txAccessNode* fxAccessNodeNew(txParser* parser, txToken token, txSymbol* symbol)
262
34.4k
{
263
34.4k
  txAccessNode* node = fxNewParserChunkClear(parser, sizeof(txAccessNode));
264
34.4k
  node->description = &gxTokenDescriptions[token];
265
34.4k
  node->symbol = symbol;
266
34.4k
  return node;
267
34.4k
}
268
269
txDeclareNode* fxDeclareNodeNew(txParser* parser, txToken token, txSymbol* symbol)
270
135k
{
271
135k
  txDeclareNode* node = fxNewParserChunkClear(parser, sizeof(txDeclareNode));
272
135k
  node->description = &gxTokenDescriptions[token];
273
135k
  node->symbol = symbol;
274
135k
  return node;
275
135k
}
276
277
txDefineNode* fxDefineNodeNew(txParser* parser, txToken token, txSymbol* symbol)
278
103k
{
279
103k
  txDefineNode* node = fxNewParserChunkClear(parser, sizeof(txDefineNode));
280
103k
  node->description = &gxTokenDescriptions[token];
281
103k
  node->symbol = symbol;
282
103k
  return node;
283
103k
}
284
285
txFieldNode* fxFieldNodeNew(txParser* parser, txToken token)
286
38.9k
{
287
38.9k
  txFieldNode* node = fxNewParserChunkClear(parser, sizeof(txFieldNode));
288
38.9k
  node->description = &gxTokenDescriptions[token];
289
38.9k
  return node;
290
38.9k
}
291
292
txSpecifierNode* fxSpecifierNodeNew(txParser* parser, txToken token)
293
8
{
294
8
  txSpecifierNode* node = fxNewParserChunkClear(parser, sizeof(txSpecifierNode));
295
8
  node->description = &gxTokenDescriptions[token];
296
8
  return node;
297
8
}
298
299
txNode* fxValueNodeNew(txParser* parser, txToken token)
300
100k
{
301
100k
  txNode* node = fxNewParserChunkClear(parser, sizeof(txNode));
302
100k
  node->description = &gxTokenDescriptions[token];
303
100k
  return node;
304
100k
}
305
306
void fxNodeDistribute(void* it, txNodeCall call, void* param)
307
2.70M
{
308
2.70M
}
309
310
void fxArrayNodeDistribute(void* it, txNodeCall call, void* param)
311
32.9k
{
312
32.9k
  txArrayNode* self = it;
313
32.9k
  fxNodeListDistribute(self->items, call, param);
314
32.9k
}
315
316
void fxArrayBindingNodeDistribute(void* it, txNodeCall call, void* param)
317
22.5k
{
318
22.5k
  txArrayBindingNode* self = it;
319
22.5k
  fxNodeListDistribute(self->items, call, param);
320
22.5k
}
321
322
void fxAssignNodeDistribute(void* it, txNodeCall call, void* param)
323
64.2k
{
324
64.2k
  txAssignNode* self = it;
325
64.2k
  (*call)(self->reference, param);
326
64.2k
  (*call)(self->value, param);
327
64.2k
}
328
329
void fxBinaryExpressionNodeDistribute(void* it, txNodeCall call, void* param)
330
508k
{
331
508k
  txBinaryExpressionNode* self = it;
332
508k
  (*call)(self->left, param);
333
508k
  (*call)(self->right, param);
334
508k
}
335
336
void fxBindingNodeDistribute(void* it, txNodeCall call, void* param)
337
42.4k
{
338
42.4k
  txBindingNode* self = it;
339
42.4k
  (*call)(self->target, param);
340
42.4k
  (*call)(self->initializer, param);
341
42.4k
}
342
343
void fxBlockNodeDistribute(void* it, txNodeCall call, void* param)
344
0
{
345
0
  txBlockNode* self = it;
346
0
  (*call)(self->statement, param);
347
0
}
348
349
void fxBodyNodeDistribute(void* it, txNodeCall call, void* param)
350
0
{
351
0
  txBlockNode* self = it;
352
0
  (*call)(self->statement, param);
353
0
}
354
355
void fxCallNewNodeDistribute(void* it, txNodeCall call, void* param)
356
157k
{
357
157k
  txCallNewNode* self = it;
358
157k
  (*call)(self->reference, param);
359
157k
  (*call)(self->params, param);
360
157k
}
361
362
void fxCaseNodeDistribute(void* it, txNodeCall call, void* param)
363
4.41k
{
364
4.41k
  txCaseNode* self = it;
365
4.41k
  if (self->expression)
366
4.34k
    (*call)(self->expression, param);
367
4.41k
  if (self->statement)
368
370
    (*call)(self->statement, param);
369
4.41k
}
370
371
void fxClassNodeDistribute(void* it, txNodeCall call, void* param)
372
0
{
373
0
  txClassNode* self = it;
374
0
  if (self->heritage)
375
0
    (*call)(self->heritage, param);
376
0
  (*call)(self->constructor, param);
377
0
  fxNodeListDistribute(self->items, call, param);
378
0
  if (self->constructorInit)
379
0
    (*call)(self->constructorInit, param);
380
0
  if (self->instanceInit)
381
0
    (*call)(self->instanceInit, param);
382
0
}
383
384
void fxCatchNodeDistribute(void* it, txNodeCall call, void* param)
385
0
{
386
0
  txCatchNode* self = it;
387
0
  (*call)(self->parameter, param);
388
0
  (*call)(self->statement, param);
389
0
}
390
391
void fxDefineNodeDistribute(void* it, txNodeCall call, void* param)
392
0
{
393
0
  txDefineNode* self = it;
394
0
  (*call)(self->initializer, param);
395
0
}
396
397
void fxDeleteNodeDistribute(void* it, txNodeCall call, void* param)
398
9.66k
{
399
9.66k
  txDeleteNode* self = it;
400
9.66k
  (*call)(self->reference, param);
401
9.66k
}
402
403
void fxDoNodeDistribute(void* it, txNodeCall call, void* param)
404
291
{
405
291
  txDoNode* self = it;
406
291
  (*call)(self->statement, param);
407
291
  (*call)(self->expression, param);
408
291
}
409
410
void fxExportNodeDistribute(void* it, txNodeCall call, void* param)
411
0
{
412
0
  txExportNode* self = it;
413
0
  if (self->specifiers)
414
0
    fxNodeListDistribute(self->specifiers, call, param);
415
0
}
416
417
void fxExpressionsNodeDistribute(void* it, txNodeCall call, void* param)
418
254k
{
419
254k
  txExpressionsNode* self = it;
420
254k
  fxNodeListDistribute(self->items, call, param);
421
254k
}
422
423
void fxFieldNodeDistribute(void* it, txNodeCall call, void* param)
424
32.6k
{
425
32.6k
  txFieldNode* self = it;
426
32.6k
  if (self->value)
427
28.2k
    (*call)(self->value, param);
428
32.6k
}
429
430
void fxForNodeDistribute(void* it, txNodeCall call, void* param)
431
0
{
432
0
  txForNode* self = it;
433
0
  if (self->initialization)
434
0
    (*call)(self->initialization, param);
435
0
  if (self->expression)
436
0
    (*call)(self->expression, param);
437
0
  if (self->iteration)
438
0
    (*call)(self->iteration, param);
439
0
  (*call)(self->statement, param);
440
0
}
441
442
void fxForInForOfNodeDistribute(void* it, txNodeCall call, void* param)
443
0
{
444
0
  txForInForOfNode* self = it;
445
0
  (*call)(self->reference, param);
446
0
  (*call)(self->expression, param);
447
0
  (*call)(self->statement, param);
448
0
}
449
450
void fxFunctionNodeDistribute(void* it, txNodeCall call, void* param)
451
0
{
452
0
  txFunctionNode* self = it;
453
0
  (*call)(self->params, param);
454
0
  (*call)(self->body, param);
455
0
}
456
457
void fxIfNodeDistribute(void* it, txNodeCall call, void* param)
458
5.18k
{
459
5.18k
  txIfNode* self = it;
460
5.18k
  (*call)(self->expression, param);
461
5.18k
  (*call)(self->thenStatement, param);
462
5.18k
  if (self->elseStatement)
463
1.00k
    (*call)(self->elseStatement, param);
464
5.18k
}
465
466
void fxImportNodeDistribute(void* it, txNodeCall call, void* param)
467
118
{
468
118
  txImportNode* self = it;
469
118
  if (self->specifiers)
470
118
    fxNodeListDistribute(self->specifiers, call, param);
471
118
}
472
473
void fxImportCallNodeDistribute(void* it, txNodeCall call, void* param)
474
1.62k
{
475
1.62k
  txImportCallNode* self = it;
476
1.62k
  (*call)(self->expression, param);
477
1.62k
  if (self->withExpression)
478
63
    (*call)(self->withExpression, param);
479
1.62k
}
480
481
void fxIncludeNodeDistribute(void* it, txNodeCall call, void* param)
482
0
{
483
0
  txIncludeNode* self = it;
484
0
  (*call)(self->body, param);
485
0
}
486
487
txLabelNode* fxLabelNodeNew(txParser* parser)
488
0
{
489
0
  txLabelNode* node = fxNewParserChunkClear(parser, sizeof(txLabelNode));
490
0
  return node;
491
0
}
492
493
void fxLabelNodeDistribute(void* it, txNodeCall call, void* param)
494
139k
{
495
139k
  txLabelNode* self = it;
496
139k
  (*call)(self->statement, param);
497
139k
}
498
499
void fxMemberNodeDistribute(void* it, txNodeCall call, void* param)
500
288k
{
501
288k
  txMemberNode* self = it;
502
288k
  (*call)(self->reference, param);
503
288k
}
504
505
void fxMemberAtNodeDistribute(void* it, txNodeCall call, void* param)
506
16.0k
{
507
16.0k
  txMemberAtNode* self = it;
508
16.0k
  (*call)(self->reference, param);
509
16.0k
  (*call)(self->at, param);
510
16.0k
}
511
512
void fxModuleNodeDistribute(void* it, txNodeCall call, void* param)
513
0
{
514
0
  txProgramNode* self = it;
515
0
  (*call)(self->body, param);
516
0
}
517
518
void fxObjectNodeDistribute(void* it, txNodeCall call, void* param)
519
33.2k
{
520
33.2k
  txObjectNode* self = it;
521
33.2k
  fxNodeListDistribute(self->items, call, param);
522
33.2k
}
523
524
void fxObjectBindingNodeDistribute(void* it, txNodeCall call, void* param)
525
654
{
526
654
  txObjectBindingNode* self = it;
527
654
  fxNodeListDistribute(self->items, call, param);
528
654
}
529
530
void fxParamsNodeDistribute(void* it, txNodeCall call, void* param)
531
141k
{
532
141k
  txParamsNode* self = it;
533
141k
  fxNodeListDistribute(self->items, call, param);
534
141k
}
535
536
void fxParamsBindingNodeDistribute(void* it, txNodeCall call, void* param)
537
0
{
538
0
  txParamsBindingNode* self = it;
539
0
  fxNodeListDistribute(self->items, call, param);
540
0
}
541
542
void fxPostfixExpressionNodeDistribute(void* it, txNodeCall call, void* param)
543
18.7k
{
544
18.7k
  txPostfixExpressionNode* self = it;
545
18.7k
  (*call)(self->left, param);
546
18.7k
}
547
548
void fxPrivateMemberNodeDistribute(void* it, txNodeCall call, void* param)
549
6.23k
{
550
6.23k
  txPrivateMemberNode* self = it;
551
6.23k
  (*call)(self->reference, param);
552
6.23k
}
553
554
void fxPrivatePropertyNodeDistribute(void* it, txNodeCall call, void* param)
555
17.8k
{
556
17.8k
  txPrivatePropertyNode* self = it;
557
17.8k
  if (self->value)
558
8.79k
    (*call)(self->value, param);
559
17.8k
}
560
561
void fxProgramNodeDistribute(void* it, txNodeCall call, void* param)
562
0
{
563
0
  txProgramNode* self = it;
564
0
  (*call)(self->body, param);
565
0
}
566
567
void fxPropertyNodeDistribute(void* it, txNodeCall call, void* param)
568
69.6k
{
569
69.6k
  txPropertyNode* self = it;
570
69.6k
  if (self->value)
571
59.3k
    (*call)(self->value, param);
572
69.6k
}
573
574
void fxPropertyAtNodeDistribute(void* it, txNodeCall call, void* param)
575
31.3k
{
576
31.3k
  txPropertyAtNode* self = it;
577
31.3k
  (*call)(self->at, param);
578
31.3k
  if (self->value)
579
4.66k
    (*call)(self->value, param);
580
31.3k
}
581
582
void fxPropertyBindingNodeDistribute(void* it, txNodeCall call, void* param)
583
844
{
584
844
  txPropertyBindingNode* self = it;
585
844
  (*call)(self->binding, param);
586
844
}
587
588
void fxPropertyBindingAtNodeDistribute(void* it, txNodeCall call, void* param)
589
625
{
590
625
  txPropertyBindingAtNode* self = it;
591
625
  (*call)(self->at, param);
592
625
  (*call)(self->binding, param);
593
625
}
594
595
void fxQuestionMarkNodeDistribute(void* it, txNodeCall call, void* param)
596
2.02k
{
597
2.02k
  txQuestionMarkNode* self = it;
598
2.02k
  (*call)(self->expression, param);
599
2.02k
  (*call)(self->thenExpression, param);
600
2.02k
  (*call)(self->elseExpression, param);
601
2.02k
}
602
603
void fxRegexpNodeDistribute(void* it, txNodeCall call, void* param)
604
12.3k
{
605
12.3k
  txRegexpNode* self = it;
606
12.3k
  (*call)(self->value, param);
607
12.3k
  (*call)(self->modifier, param);
608
12.3k
}
609
610
void fxRestBindingNodeDistribute(void* it, txNodeCall call, void* param)
611
1.32k
{
612
1.32k
  txRestBindingNode* self = it;
613
1.32k
  (*call)(self->binding, param);
614
1.32k
}
615
616
void fxReturnNodeDistribute(void* it, txNodeCall call, void* param)
617
40.9k
{
618
40.9k
  txStatementNode* self = it;
619
40.9k
  if (self->expression)
620
37.0k
    (*call)(self->expression, param);
621
40.9k
}
622
623
void fxSpreadNodeDistribute(void* it, txNodeCall call, void* param)
624
1.59k
{
625
1.59k
  txSpreadNode* self = it;
626
1.59k
  (*call)(self->expression, param);
627
1.59k
}
628
629
void fxStatementNodeDistribute(void* it, txNodeCall call, void* param)
630
682k
{
631
682k
  txStatementNode* self = it;
632
682k
  (*call)(self->expression, param);
633
682k
}
634
635
void fxStatementsNodeDistribute(void* it, txNodeCall call, void* param)
636
202k
{
637
202k
  txStatementsNode* self = it;
638
202k
  fxNodeListDistribute(self->items, call, param);
639
202k
}
640
641
void fxSuperNodeDistribute(void* it, txNodeCall call, void* param)
642
347
{
643
347
  txSuperNode* self = it;
644
347
  (*call)(self->params, param);
645
347
}
646
647
void fxSwitchNodeDistribute(void* it, txNodeCall call, void* param)
648
0
{
649
0
  txSwitchNode* self = it;
650
0
  (*call)(self->expression, param);
651
0
  fxNodeListDistribute(self->items, call, param);
652
0
}
653
654
void fxTemplateNodeDistribute(void* it, txNodeCall call, void* param)
655
480k
{
656
480k
  txTemplateNode* self = it;
657
480k
  if (self->reference)
658
444k
    (*call)(self->reference, param);
659
480k
  fxNodeListDistribute(self->items, call, param);
660
480k
}
661
662
void fxTemplateItemNodeDistribute(void* it, txNodeCall call, void* param)
663
987k
{
664
987k
  txTemplateItemNode* self = it;
665
987k
  (*call)(self->string, param);
666
987k
  (*call)(self->raw, param);
667
987k
}
668
669
void fxTryNodeDistribute(void* it, txNodeCall call, void* param)
670
2.05k
{
671
2.05k
  txTryNode* self = it;
672
2.05k
  (*call)(self->tryBlock, param);
673
2.05k
  if (self->catchBlock)
674
2.03k
    (*call)(self->catchBlock, param);
675
2.05k
  if (self->finallyBlock)
676
29
    (*call)(self->finallyBlock, param);
677
2.05k
}
678
679
void fxUnaryExpressionNodeDistribute(void* it, txNodeCall call, void* param)
680
78.6k
{
681
78.6k
  txUnaryExpressionNode* self = it;
682
78.6k
  (*call)(self->right, param);
683
78.6k
}
684
685
void fxWhileNodeDistribute(void* it, txNodeCall call, void* param)
686
5.30k
{
687
5.30k
  txWhileNode* self = it;
688
5.30k
  (*call)(self->expression, param);
689
5.30k
  (*call)(self->statement, param);
690
5.30k
}
691
692
void fxWithNodeDistribute(void* it, txNodeCall call, void* param)
693
0
{
694
0
  txWithNode* self = it;
695
0
  (*call)(self->expression, param);
696
0
  (*call)(self->statement, param);
697
0
}
698
699
static const txNodeDispatch gxAccessNodeDispatch ICACHE_FLASH_ATTR = {
700
  fxNodeDistribute,
701
  fxAccessNodeBind,
702
  fxNodeHoist,
703
  fxAccessNodeCode,
704
  fxAccessNodeCodeAssign,
705
  fxAccessNodeCodeDelete,
706
  fxAccessNodeCodeReference,
707
  fxAccessNodeCodeThis
708
};
709
static const txNodeDispatch gxAndExpressionNodeDispatch ICACHE_FLASH_ATTR = {
710
  fxBinaryExpressionNodeDistribute,
711
  fxNodeBind,
712
  fxNodeHoist,
713
  fxAndExpressionNodeCode,
714
  fxNodeCodeAssign,
715
  fxNodeCodeDelete,
716
  fxNodeCodeReference,
717
  fxNodeCodeThis
718
};
719
static const txNodeDispatch gxArgumentsNodeDispatch ICACHE_FLASH_ATTR = {
720
  fxNodeDistribute,
721
  fxNodeBind,
722
  fxNodeHoist,
723
  fxArgumentsNodeCode,
724
  fxNodeCodeAssign,
725
  fxNodeCodeDelete,
726
  fxNodeCodeReference,
727
  fxNodeCodeThis
728
};
729
static const txNodeDispatch gxArrayNodeDispatch ICACHE_FLASH_ATTR = {
730
  fxArrayNodeDistribute,
731
  fxArrayNodeBind,
732
  fxNodeHoist,
733
  fxArrayNodeCode,
734
  fxNodeCodeAssign,
735
  fxNodeCodeDelete,
736
  fxNodeCodeReference,
737
  fxNodeCodeThis
738
};
739
static const txNodeDispatch gxArrayBindingNodeDispatch ICACHE_FLASH_ATTR = {
740
  fxArrayBindingNodeDistribute,
741
  fxArrayBindingNodeBind,
742
  fxNodeHoist,
743
  fxArrayBindingNodeCode,
744
  fxArrayBindingNodeCodeAssign,
745
  fxNodeCodeDelete,
746
  fxNodeCodeReference,
747
  fxNodeCodeThis
748
};
749
static const txNodeDispatch gxAssignNodeDispatch ICACHE_FLASH_ATTR = {
750
  fxAssignNodeDistribute,
751
  fxAssignNodeBind,
752
  fxNodeHoist,
753
  fxAssignNodeCode,
754
  fxNodeCodeAssign,
755
  fxNodeCodeDelete,
756
  fxNodeCodeReference,
757
  fxNodeCodeThis
758
};
759
static const txNodeDispatch gxAwaitNodeDispatch ICACHE_FLASH_ATTR = {
760
  fxStatementNodeDistribute,
761
  fxNodeBind,
762
  fxNodeHoist,
763
  fxAwaitNodeCode,
764
  fxNodeCodeAssign,
765
  fxNodeCodeDelete,
766
  fxNodeCodeReference,
767
  fxNodeCodeThis
768
};
769
static const txNodeDispatch gxBigIntNodeDispatch ICACHE_FLASH_ATTR = {
770
  fxNodeDistribute,
771
  fxNodeBind,
772
  fxNodeHoist,
773
  fxBigIntNodeCode,
774
  fxNodeCodeAssign,
775
  fxNodeCodeDelete,
776
  fxNodeCodeReference,
777
  fxNodeCodeThis
778
};
779
static const txNodeDispatch gxBinaryExpressionNodeDispatch ICACHE_FLASH_ATTR = {
780
  fxBinaryExpressionNodeDistribute,
781
  fxNodeBind,
782
  fxNodeHoist,
783
  fxBinaryExpressionNodeCode,
784
  fxNodeCodeAssign,
785
  fxNodeCodeDelete,
786
  fxNodeCodeReference,
787
  fxNodeCodeThis
788
};
789
static const txNodeDispatch gxBindingNodeDispatch ICACHE_FLASH_ATTR = {
790
  fxBindingNodeDistribute,
791
  fxBindingNodeBind,
792
  fxNodeHoist,
793
  fxBindingNodeCode,
794
  fxBindingNodeCodeAssign,
795
  fxNodeCodeDelete,
796
  fxBindingNodeCodeReference,
797
  fxNodeCodeThis
798
};
799
static const txNodeDispatch gxBlockNodeDispatch ICACHE_FLASH_ATTR = {
800
  fxBlockNodeDistribute,
801
  fxBlockNodeBind,
802
  fxBlockNodeHoist,
803
  fxBlockNodeCode,
804
  fxNodeCodeAssign,
805
  fxNodeCodeDelete,
806
  fxNodeCodeReference,
807
  fxNodeCodeThis
808
};
809
static const txNodeDispatch gxBodyNodeDispatch ICACHE_FLASH_ATTR = {
810
  fxBodyNodeDistribute,
811
  fxBlockNodeBind,
812
  fxBodyNodeHoist,
813
  fxBodyNodeCode,
814
  fxNodeCodeAssign,
815
  fxNodeCodeDelete,
816
  fxNodeCodeReference,
817
  fxNodeCodeThis
818
};
819
static const txNodeDispatch gxBreakContinueNodeDispatch ICACHE_FLASH_ATTR = {
820
  fxNodeDistribute,
821
  fxNodeBind,
822
  fxNodeHoist,
823
  fxBreakContinueNodeCode,
824
  fxNodeCodeAssign,
825
  fxNodeCodeDelete,
826
  fxNodeCodeReference,
827
  fxNodeCodeThis
828
};
829
static const txNodeDispatch gxCallNodeDispatch ICACHE_FLASH_ATTR = {
830
  fxCallNewNodeDistribute,
831
  fxNodeBind,
832
  fxCallNodeHoist,
833
  fxCallNodeCode,
834
  fxNodeCodeAssign,
835
  fxNodeCodeDelete,
836
  fxNodeCodeReference,
837
  fxNodeCodeThis
838
};
839
static const txNodeDispatch gxCaseNodeDispatch ICACHE_FLASH_ATTR = {
840
  fxCaseNodeDistribute,
841
  fxNodeBind,
842
  fxNodeHoist,
843
  fxNodeCode,
844
  fxNodeCodeAssign,
845
  fxNodeCodeDelete,
846
  fxNodeCodeReference,
847
  fxNodeCodeThis
848
};
849
static const txNodeDispatch gxCatchNodeDispatch ICACHE_FLASH_ATTR = {
850
  fxCatchNodeDistribute,
851
  fxCatchNodeBind,
852
  fxCatchNodeHoist,
853
  fxCatchNodeCode,
854
  fxNodeCodeAssign,
855
  fxNodeCodeDelete,
856
  fxNodeCodeReference,
857
  fxNodeCodeThis
858
};
859
static const txNodeDispatch gxChainNodeDispatch ICACHE_FLASH_ATTR = {
860
  fxUnaryExpressionNodeDistribute,
861
  fxNodeBind,
862
  fxNodeHoist,
863
  fxChainNodeCode,
864
  fxNodeCodeAssign,
865
  fxNodeCodeDelete,
866
  fxNodeCodeReference,
867
  fxChainNodeCodeThis
868
};
869
static const txNodeDispatch gxClassNodeDispatch ICACHE_FLASH_ATTR = {
870
  fxClassNodeDistribute,
871
  fxClassNodeBind,
872
  fxClassNodeHoist,
873
  fxClassNodeCode,
874
  fxNodeCodeAssign,
875
  fxNodeCodeDelete,
876
  fxNodeCodeReference,
877
  fxNodeCodeThis
878
};
879
static const txNodeDispatch gxCoalesceExpressionNodeDispatch ICACHE_FLASH_ATTR = {
880
  fxBinaryExpressionNodeDistribute,
881
  fxNodeBind,
882
  fxCoalesceExpressionNodeHoist,
883
  fxCoalesceExpressionNodeCode,
884
  fxNodeCodeAssign,
885
  fxNodeCodeDelete,
886
  fxNodeCodeReference,
887
  fxNodeCodeThis
888
};
889
static const txNodeDispatch gxCompoundExpressionNodeDispatch ICACHE_FLASH_ATTR = {
890
  fxAssignNodeDistribute,
891
  fxNodeBind,
892
  fxNodeHoist,
893
  fxCompoundExpressionNodeCode,
894
  fxNodeCodeAssign,
895
  fxNodeCodeDelete,
896
  fxNodeCodeReference,
897
  fxNodeCodeThis
898
};
899
static const txNodeDispatch gxDebuggerNodeDispatch ICACHE_FLASH_ATTR = {
900
  fxNodeDistribute,
901
  fxNodeBind,
902
  fxNodeHoist,
903
  fxDebuggerNodeCode,
904
  fxNodeCodeAssign,
905
  fxNodeCodeDelete,
906
  fxNodeCodeReference,
907
  fxNodeCodeThis
908
};
909
static const txNodeDispatch gxDeclareNodeDispatch ICACHE_FLASH_ATTR = {
910
  fxNodeDistribute,
911
  fxDeclareNodeBind,
912
  fxDeclareNodeHoist,
913
  fxDeclareNodeCode,
914
  fxDeclareNodeCodeAssign,
915
  fxNodeCodeDelete,
916
  fxDeclareNodeCodeReference,
917
  fxNodeCodeThis
918
};
919
static const txNodeDispatch gxDefineNodeDispatch ICACHE_FLASH_ATTR = {
920
  fxDefineNodeDistribute,
921
  fxDefineNodeBind,
922
  fxDefineNodeHoist,
923
  fxDefineNodeCode,
924
  fxNodeCodeAssign,
925
  fxNodeCodeDelete,
926
  fxNodeCodeReference,
927
  fxNodeCodeThis
928
};
929
static const txNodeDispatch gxDelegateNodeDispatch ICACHE_FLASH_ATTR = {
930
  fxStatementNodeDistribute,
931
  fxDelegateNodeBind,
932
  fxNodeHoist,
933
  fxDelegateNodeCode,
934
  fxNodeCodeAssign,
935
  fxNodeCodeDelete,
936
  fxNodeCodeReference,
937
  fxNodeCodeThis
938
};
939
static const txNodeDispatch gxDeleteNodeDispatch ICACHE_FLASH_ATTR = {
940
  fxDeleteNodeDistribute,
941
  fxNodeBind,
942
  fxNodeHoist,
943
  fxDeleteNodeCode,
944
  fxNodeCodeAssign,
945
  fxNodeCodeDelete,
946
  fxNodeCodeReference,
947
  fxNodeCodeThis
948
};
949
static const txNodeDispatch gxDoNodeDispatch ICACHE_FLASH_ATTR = {
950
  fxDoNodeDistribute,
951
  fxNodeBind,
952
  fxNodeHoist,
953
  fxDoNodeCode,
954
  fxNodeCodeAssign,
955
  fxNodeCodeDelete,
956
  fxNodeCodeReference,
957
  fxNodeCodeThis
958
};
959
static const txNodeDispatch gxExportNodeDispatch ICACHE_FLASH_ATTR = {
960
  fxExportNodeDistribute,
961
  fxExportNodeBind,
962
  fxExportNodeHoist,
963
  fxExportNodeCode,
964
  fxNodeCodeAssign,
965
  fxNodeCodeDelete,
966
  fxNodeCodeReference,
967
  fxNodeCodeThis
968
};
969
static const txNodeDispatch gxExpressionsNodeDispatch ICACHE_FLASH_ATTR = {
970
  fxExpressionsNodeDistribute,
971
  fxNodeBind,
972
  fxNodeHoist,
973
  fxExpressionsNodeCode,
974
  fxNodeCodeAssign,
975
  fxExpressionsNodeCodeDelete,
976
  fxNodeCodeReference,
977
  fxExpressionsNodeCodeThis
978
};
979
static const txNodeDispatch gxFieldNodeDispatch ICACHE_FLASH_ATTR = {
980
  fxFieldNodeDistribute,
981
  fxFieldNodeBind,
982
  fxNodeHoist,
983
  fxFieldNodeCode,
984
  fxNodeCodeAssign,
985
  fxNodeCodeDelete,
986
  fxNodeCodeReference,
987
  fxNodeCodeThis
988
};
989
static const txNodeDispatch gxForNodeDispatch ICACHE_FLASH_ATTR = {
990
  fxForNodeDistribute,
991
  fxForNodeBind,
992
  fxForNodeHoist,
993
  fxForNodeCode,
994
  fxNodeCodeAssign,
995
  fxNodeCodeDelete,
996
  fxNodeCodeReference,
997
  fxNodeCodeThis
998
};
999
static const txNodeDispatch gxForInForOfNodeDispatch ICACHE_FLASH_ATTR = {
1000
  fxForInForOfNodeDistribute,
1001
  fxForInForOfNodeBind,
1002
  fxForInForOfNodeHoist,
1003
  fxForInForOfNodeCode,
1004
  fxNodeCodeAssign,
1005
  fxNodeCodeDelete,
1006
  fxNodeCodeReference,
1007
  fxNodeCodeThis
1008
};
1009
static const txNodeDispatch gxFunctionNodeDispatch ICACHE_FLASH_ATTR = {
1010
  fxFunctionNodeDistribute,
1011
  fxFunctionNodeBind,
1012
  fxFunctionNodeHoist,
1013
  fxFunctionNodeCode,
1014
  fxNodeCodeAssign,
1015
  fxNodeCodeDelete,
1016
  fxNodeCodeReference,
1017
  fxNodeCodeThis
1018
};
1019
static const txNodeDispatch gxHostNodeDispatch ICACHE_FLASH_ATTR = {
1020
  fxNodeDistribute,
1021
  fxHostNodeBind,
1022
  fxHostNodeHoist,
1023
  fxHostNodeCode,
1024
  fxNodeCodeAssign,
1025
  fxNodeCodeDelete,
1026
  fxNodeCodeReference,
1027
  fxNodeCodeThis
1028
};
1029
static const txNodeDispatch gxIfNodeDispatch ICACHE_FLASH_ATTR = {
1030
  fxIfNodeDistribute,
1031
  fxNodeBind,
1032
  fxNodeHoist,
1033
  fxIfNodeCode,
1034
  fxNodeCodeAssign,
1035
  fxNodeCodeDelete,
1036
  fxNodeCodeReference,
1037
  fxNodeCodeThis
1038
};
1039
static const txNodeDispatch gxImportNodeDispatch ICACHE_FLASH_ATTR = {
1040
  fxImportNodeDistribute,
1041
  fxNodeBind,
1042
  fxImportNodeHoist,
1043
  fxImportNodeCode,
1044
  fxNodeCodeAssign,
1045
  fxNodeCodeDelete,
1046
  fxNodeCodeReference,
1047
  fxNodeCodeThis
1048
};
1049
static const txNodeDispatch gxImportCallNodeDispatch ICACHE_FLASH_ATTR = {
1050
  fxImportCallNodeDistribute,
1051
  fxNodeBind,
1052
  fxNodeHoist,
1053
  fxImportCallNodeCode,
1054
  fxNodeCodeAssign,
1055
  fxNodeCodeDelete,
1056
  fxNodeCodeReference,
1057
  fxNodeCodeThis
1058
};
1059
static const txNodeDispatch gxImportMetaNodeDispatch ICACHE_FLASH_ATTR = {
1060
  fxNodeDistribute,
1061
  fxNodeBind,
1062
  fxNodeHoist,
1063
  fxImportMetaNodeCode,
1064
  fxNodeCodeAssign,
1065
  fxNodeCodeDelete,
1066
  fxNodeCodeReference,
1067
  fxNodeCodeThis
1068
};
1069
static const txNodeDispatch gxIncludeNodeDispatch ICACHE_FLASH_ATTR = {
1070
  fxIncludeNodeDistribute,
1071
  fxNodeBind,
1072
  fxNodeHoist,
1073
  fxIncludeNodeCode,
1074
  fxNodeCodeAssign,
1075
  fxNodeCodeDelete,
1076
  fxNodeCodeReference,
1077
  fxNodeCodeThis
1078
};
1079
static const txNodeDispatch gxIntegerNodeDispatch ICACHE_FLASH_ATTR = {
1080
  fxNodeDistribute,
1081
  fxNodeBind,
1082
  fxNodeHoist,
1083
  fxIntegerNodeCode,
1084
  fxNodeCodeAssign,
1085
  fxNodeCodeDelete,
1086
  fxNodeCodeReference,
1087
  fxNodeCodeThis
1088
};
1089
static const txNodeDispatch gxLabelNodeDispatch ICACHE_FLASH_ATTR = {
1090
  fxLabelNodeDistribute,
1091
  fxNodeBind,
1092
  fxNodeHoist,
1093
  fxLabelNodeCode,
1094
  fxNodeCodeAssign,
1095
  fxNodeCodeDelete,
1096
  fxNodeCodeReference,
1097
  fxNodeCodeThis
1098
};
1099
static const txNodeDispatch gxMemberNodeDispatch ICACHE_FLASH_ATTR = {
1100
  fxMemberNodeDistribute,
1101
  fxNodeBind,
1102
  fxNodeHoist,
1103
  fxMemberNodeCode,
1104
  fxMemberNodeCodeAssign,
1105
  fxMemberNodeCodeDelete,
1106
  fxMemberNodeCodeReference,
1107
  fxMemberNodeCodeThis
1108
};
1109
static const txNodeDispatch gxMemberAtNodeDispatch ICACHE_FLASH_ATTR = {
1110
  fxMemberAtNodeDistribute,
1111
  fxNodeBind,
1112
  fxNodeHoist,
1113
  fxMemberAtNodeCode,
1114
  fxMemberAtNodeCodeAssign,
1115
  fxMemberAtNodeCodeDelete,
1116
  fxMemberAtNodeCodeReference,
1117
  fxMemberAtNodeCodeThis
1118
};
1119
static const txNodeDispatch gxModuleNodeDispatch ICACHE_FLASH_ATTR = {
1120
  fxModuleNodeDistribute,
1121
  fxModuleNodeBind,
1122
  fxModuleNodeHoist,
1123
  fxModuleNodeCode,
1124
  fxNodeCodeAssign,
1125
  fxNodeCodeDelete,
1126
  fxNodeCodeReference,
1127
  fxNodeCodeThis
1128
};
1129
static const txNodeDispatch gxNewNodeDispatch ICACHE_FLASH_ATTR = {
1130
  fxCallNewNodeDistribute,
1131
  fxNodeBind,
1132
  fxNodeHoist,
1133
  fxNewNodeCode,
1134
  fxNodeCodeAssign,
1135
  fxNodeCodeDelete,
1136
  fxNodeCodeReference,
1137
  fxNodeCodeThis
1138
};
1139
static const txNodeDispatch gxNumberNodeDispatch ICACHE_FLASH_ATTR = {
1140
  fxNodeDistribute,
1141
  fxNodeBind,
1142
  fxNodeHoist,
1143
  fxNumberNodeCode,
1144
  fxNodeCodeAssign,
1145
  fxNodeCodeDelete,
1146
  fxNodeCodeReference,
1147
  fxNodeCodeThis
1148
};
1149
static const txNodeDispatch gxObjectNodeDispatch ICACHE_FLASH_ATTR = {
1150
  fxObjectNodeDistribute,
1151
  fxObjectNodeBind,
1152
  fxNodeHoist,
1153
  fxObjectNodeCode,
1154
  fxNodeCodeAssign,
1155
  fxNodeCodeDelete,
1156
  fxNodeCodeReference,
1157
  fxNodeCodeThis
1158
};
1159
static const txNodeDispatch gxObjectBindingNodeDispatch ICACHE_FLASH_ATTR = {
1160
  fxObjectBindingNodeDistribute,
1161
  fxObjectBindingNodeBind,
1162
  fxNodeHoist,
1163
  fxObjectBindingNodeCode,
1164
  fxObjectBindingNodeCodeAssign,
1165
  fxNodeCodeDelete,
1166
  fxNodeCodeReference,
1167
  fxNodeCodeThis
1168
};
1169
static const txNodeDispatch gxOptionNodeDispatch ICACHE_FLASH_ATTR = {
1170
  fxUnaryExpressionNodeDistribute,
1171
  fxNodeBind,
1172
  fxNodeHoist,
1173
  fxOptionNodeCode,
1174
  fxNodeCodeAssign,
1175
  fxNodeCodeDelete,
1176
  fxNodeCodeReference,
1177
  fxOptionNodeCodeThis
1178
};
1179
static const txNodeDispatch gxOrExpressionNodeDispatch ICACHE_FLASH_ATTR = {
1180
  fxBinaryExpressionNodeDistribute,
1181
  fxNodeBind,
1182
  fxNodeHoist,
1183
  fxOrExpressionNodeCode,
1184
  fxNodeCodeAssign,
1185
  fxNodeCodeDelete,
1186
  fxNodeCodeReference,
1187
  fxNodeCodeThis
1188
};
1189
static const txNodeDispatch gxParamsNodeDispatch ICACHE_FLASH_ATTR = {
1190
  fxParamsNodeDistribute,
1191
  fxParamsNodeBind,
1192
  fxNodeHoist,
1193
  fxParamsNodeCode,
1194
  fxNodeCodeAssign,
1195
  fxNodeCodeDelete,
1196
  fxNodeCodeReference,
1197
  fxNodeCodeThis
1198
};
1199
static const txNodeDispatch gxParamsBindingNodeDispatch ICACHE_FLASH_ATTR = {
1200
  fxParamsBindingNodeDistribute,
1201
  fxParamsBindingNodeBind,
1202
  fxParamsBindingNodeHoist,
1203
  fxParamsBindingNodeCode,
1204
  fxNodeCodeAssign,
1205
  fxNodeCodeDelete,
1206
  fxNodeCodeReference,
1207
  fxNodeCodeThis
1208
};
1209
static const txNodeDispatch gxPostfixExpressionNodeDispatch ICACHE_FLASH_ATTR = {
1210
  fxPostfixExpressionNodeDistribute,
1211
  fxPostfixExpressionNodeBind,
1212
  fxNodeHoist,
1213
  fxPostfixExpressionNodeCode,
1214
  fxNodeCodeAssign,
1215
  fxNodeCodeDelete,
1216
  fxNodeCodeReference,
1217
  fxNodeCodeThis
1218
};
1219
static const txNodeDispatch gxPrivateIdentifierNodeDispatch ICACHE_FLASH_ATTR = {
1220
  fxPrivateMemberNodeDistribute,
1221
  fxPrivateMemberNodeBind,
1222
  fxNodeHoist,
1223
  fxPrivateIdentifierNodeCode,
1224
  fxNodeCodeAssign,
1225
  fxNodeCodeDelete,
1226
  fxNodeCodeReference,
1227
  fxNodeCodeThis
1228
};
1229
static const txNodeDispatch gxPrivateMemberNodeDispatch ICACHE_FLASH_ATTR = {
1230
  fxPrivateMemberNodeDistribute,
1231
  fxPrivateMemberNodeBind,
1232
  fxNodeHoist,
1233
  fxPrivateMemberNodeCode,
1234
  fxPrivateMemberNodeCodeAssign,
1235
  fxPrivateMemberNodeCodeDelete,
1236
  fxPrivateMemberNodeCodeReference,
1237
  fxPrivateMemberNodeCodeThis
1238
};
1239
static const txNodeDispatch gxPrivatePropertyNodeDispatch ICACHE_FLASH_ATTR = {
1240
  fxPrivatePropertyNodeDistribute,
1241
  fxNodeBind,
1242
  fxNodeHoist,
1243
  fxNodeCode,
1244
  fxNodeCodeAssign,
1245
  fxNodeCodeDelete,
1246
  fxNodeCodeReference,
1247
  fxNodeCodeThis
1248
};
1249
static const txNodeDispatch gxProgramNodeDispatch ICACHE_FLASH_ATTR = {
1250
  fxProgramNodeDistribute,
1251
  fxProgramNodeBind,
1252
  fxProgramNodeHoist,
1253
  fxProgramNodeCode,
1254
  fxNodeCodeAssign,
1255
  fxNodeCodeDelete,
1256
  fxNodeCodeReference,
1257
  fxNodeCodeThis
1258
};
1259
static const txNodeDispatch gxPropertyNodeDispatch ICACHE_FLASH_ATTR = {
1260
  fxPropertyNodeDistribute,
1261
  fxNodeBind,
1262
  fxPropertyNodeHoist,
1263
  fxNodeCode,
1264
  fxNodeCodeAssign,
1265
  fxNodeCodeDelete,
1266
  fxNodeCodeReference,
1267
  fxNodeCodeThis
1268
};
1269
static const txNodeDispatch gxPropertyAtNodeDispatch ICACHE_FLASH_ATTR = {
1270
  fxPropertyAtNodeDistribute,
1271
  fxNodeBind,
1272
  fxNodeHoist,
1273
  fxNodeCode,
1274
  fxNodeCodeAssign,
1275
  fxNodeCodeDelete,
1276
  fxNodeCodeReference,
1277
  fxNodeCodeThis
1278
};
1279
static const txNodeDispatch gxPropertyBindingNodeDispatch ICACHE_FLASH_ATTR = {
1280
  fxPropertyBindingNodeDistribute,
1281
  fxNodeBind,
1282
  fxNodeHoist,
1283
  fxNodeCode,
1284
  fxNodeCodeAssign,
1285
  fxNodeCodeDelete,
1286
  fxNodeCodeReference,
1287
  fxNodeCodeThis
1288
};
1289
static const txNodeDispatch gxPropertyBindingAtNodeDispatch ICACHE_FLASH_ATTR = {
1290
  fxPropertyBindingAtNodeDistribute,
1291
  fxNodeBind,
1292
  fxNodeHoist,
1293
  fxNodeCode,
1294
  fxNodeCodeAssign,
1295
  fxNodeCodeDelete,
1296
  fxNodeCodeReference,
1297
  fxNodeCodeThis
1298
};
1299
static const txNodeDispatch gxQuestionMarkNodeDispatch ICACHE_FLASH_ATTR = {
1300
  fxQuestionMarkNodeDistribute,
1301
  fxNodeBind,
1302
  fxNodeHoist,
1303
  fxQuestionMarkNodeCode,
1304
  fxNodeCodeAssign,
1305
  fxNodeCodeDelete,
1306
  fxNodeCodeReference,
1307
  fxNodeCodeThis
1308
};
1309
static const txNodeDispatch gxRegexpNodeDispatch ICACHE_FLASH_ATTR = {
1310
  fxRegexpNodeDistribute,
1311
  fxNodeBind,
1312
  fxNodeHoist,
1313
  fxRegexpNodeCode,
1314
  fxNodeCodeAssign,
1315
  fxNodeCodeDelete,
1316
  fxNodeCodeReference,
1317
  fxNodeCodeThis
1318
};
1319
static const txNodeDispatch gxRestBindingNodeDispatch ICACHE_FLASH_ATTR = {
1320
  fxRestBindingNodeDistribute,
1321
  fxNodeBind,
1322
  fxNodeHoist,
1323
  fxNodeCode,
1324
  fxNodeCodeAssign,
1325
  fxNodeCodeDelete,
1326
  fxNodeCodeReference,
1327
  fxNodeCodeThis
1328
};
1329
static const txNodeDispatch gxReturnNodeDispatch ICACHE_FLASH_ATTR = {
1330
  fxReturnNodeDistribute,
1331
  fxNodeBind,
1332
  fxNodeHoist,
1333
  fxReturnNodeCode,
1334
  fxNodeCodeAssign,
1335
  fxNodeCodeDelete,
1336
  fxNodeCodeReference,
1337
  fxNodeCodeThis
1338
};
1339
static const txNodeDispatch gxSkipBindingNodeDispatch ICACHE_FLASH_ATTR = {
1340
  fxNodeDistribute,
1341
  fxNodeBind,
1342
  fxNodeHoist,
1343
  fxNodeCode,
1344
  fxNodeCodeAssign,
1345
  fxNodeCodeDelete,
1346
  fxNodeCodeReference,
1347
  fxNodeCodeThis
1348
};
1349
static const txNodeDispatch gxSpecifierNodeDispatch ICACHE_FLASH_ATTR = {
1350
  fxNodeDistribute,
1351
  fxNodeBind,
1352
  fxNodeHoist,
1353
  fxNodeCode,
1354
  fxNodeCodeAssign,
1355
  fxNodeCodeDelete,
1356
  fxNodeCodeReference,
1357
  fxNodeCodeThis
1358
};
1359
static const txNodeDispatch gxSpreadNodeDispatch ICACHE_FLASH_ATTR = {
1360
  fxSpreadNodeDistribute,
1361
  fxSpreadNodeBind,
1362
  fxNodeHoist,
1363
  fxNodeCode,
1364
  fxNodeCodeAssign,
1365
  fxNodeCodeDelete,
1366
  fxNodeCodeReference,
1367
  fxNodeCodeThis
1368
};
1369
static const txNodeDispatch gxStatementNodeDispatch ICACHE_FLASH_ATTR = {
1370
  fxStatementNodeDistribute,
1371
  fxNodeBind,
1372
  fxStatementNodeHoist,
1373
  fxStatementNodeCode,
1374
  fxNodeCodeAssign,
1375
  fxNodeCodeDelete,
1376
  fxNodeCodeReference,
1377
  fxNodeCodeThis
1378
};
1379
static const txNodeDispatch gxStatementsNodeDispatch ICACHE_FLASH_ATTR = {
1380
  fxStatementsNodeDistribute,
1381
  fxNodeBind,
1382
  fxNodeHoist,
1383
  fxStatementsNodeCode,
1384
  fxNodeCodeAssign,
1385
  fxNodeCodeDelete,
1386
  fxNodeCodeReference,
1387
  fxNodeCodeThis
1388
};
1389
static const txNodeDispatch gxStringNodeDispatch ICACHE_FLASH_ATTR = {
1390
  fxNodeDistribute,
1391
  fxNodeBind,
1392
  fxStringNodeHoist,
1393
  fxStringNodeCode,
1394
  fxNodeCodeAssign,
1395
  fxNodeCodeDelete,
1396
  fxNodeCodeReference,
1397
  fxNodeCodeThis
1398
};
1399
static const txNodeDispatch gxSuperNodeDispatch ICACHE_FLASH_ATTR = {
1400
  fxSuperNodeDistribute,
1401
  fxSuperNodeBind,
1402
  fxNodeHoist,
1403
  fxSuperNodeCode,
1404
  fxNodeCodeAssign,
1405
  fxNodeCodeDelete,
1406
  fxNodeCodeReference,
1407
  fxNodeCodeThis
1408
};
1409
static const txNodeDispatch gxSwitchNodeDispatch ICACHE_FLASH_ATTR = {
1410
  fxSwitchNodeDistribute,
1411
  fxSwitchNodeBind,
1412
  fxSwitchNodeHoist,
1413
  fxSwitchNodeCode,
1414
  fxNodeCodeAssign,
1415
  fxNodeCodeDelete,
1416
  fxNodeCodeReference,
1417
  fxNodeCodeThis
1418
};
1419
static const txNodeDispatch gxTargetNodeDispatch ICACHE_FLASH_ATTR = {
1420
  fxNodeDistribute,
1421
  fxTargetNodeBind,
1422
  fxNodeHoist,
1423
  fxValueNodeCode,
1424
  fxNodeCodeAssign,
1425
  fxNodeCodeDelete,
1426
  fxNodeCodeReference,
1427
  fxNodeCodeThis
1428
};
1429
static const txNodeDispatch gxTemplateNodeDispatch ICACHE_FLASH_ATTR = {
1430
  fxTemplateNodeDistribute,
1431
  fxTemplateNodeBind,
1432
  fxNodeHoist,
1433
  fxTemplateNodeCode,
1434
  fxNodeCodeAssign,
1435
  fxNodeCodeDelete,
1436
  fxNodeCodeReference,
1437
  fxNodeCodeThis
1438
};
1439
static const txNodeDispatch gxTemplateItemNodeDispatch ICACHE_FLASH_ATTR = {
1440
  fxTemplateItemNodeDistribute,
1441
  fxNodeBind,
1442
  fxNodeHoist,
1443
  fxNodeCode,
1444
  fxNodeCodeAssign,
1445
  fxNodeCodeDelete,
1446
  fxNodeCodeReference,
1447
  fxNodeCodeThis
1448
};
1449
static const txNodeDispatch gxThisNodeDispatch ICACHE_FLASH_ATTR = {
1450
  fxNodeDistribute,
1451
  fxThisNodeBind,
1452
  fxNodeHoist,
1453
  fxThisNodeCode,
1454
  fxNodeCodeAssign,
1455
  fxNodeCodeDelete,
1456
  fxNodeCodeReference,
1457
  fxNodeCodeThis
1458
};
1459
static const txNodeDispatch gxThrowNodeDispatch ICACHE_FLASH_ATTR = {
1460
  fxStatementNodeDistribute,
1461
  fxNodeBind,
1462
  fxNodeHoist,
1463
  fxThrowNodeCode,
1464
  fxNodeCodeAssign,
1465
  fxNodeCodeDelete,
1466
  fxNodeCodeReference,
1467
  fxNodeCodeThis
1468
};
1469
static const txNodeDispatch gxTryNodeDispatch ICACHE_FLASH_ATTR = {
1470
  fxTryNodeDistribute,
1471
  fxTryNodeBind,
1472
  fxNodeHoist,
1473
  fxTryNodeCode,
1474
  fxNodeCodeAssign,
1475
  fxNodeCodeDelete,
1476
  fxNodeCodeReference,
1477
  fxNodeCodeThis
1478
};
1479
static const txNodeDispatch gxUnaryExpressionNodeDispatch ICACHE_FLASH_ATTR = {
1480
  fxUnaryExpressionNodeDistribute,
1481
  fxNodeBind,
1482
  fxNodeHoist,
1483
  fxUnaryExpressionNodeCode,
1484
  fxNodeCodeAssign,
1485
  fxNodeCodeDelete,
1486
  fxNodeCodeReference,
1487
  fxNodeCodeThis
1488
};
1489
static const txNodeDispatch gxUndefinedNodeDispatch ICACHE_FLASH_ATTR = {
1490
  fxNodeDistribute,
1491
  fxNodeBind,
1492
  fxNodeHoist,
1493
  fxValueNodeCode,
1494
  fxUndefinedNodeCodeAssign,
1495
  fxUndefinedNodeCodeDelete,
1496
  fxUndefinedNodeCodeReference,
1497
  fxNodeCodeThis
1498
};
1499
static const txNodeDispatch gxValueNodeDispatch ICACHE_FLASH_ATTR = {
1500
  fxNodeDistribute,
1501
  fxNodeBind,
1502
  fxNodeHoist,
1503
  fxValueNodeCode,
1504
  fxNodeCodeAssign,
1505
  fxNodeCodeDelete,
1506
  fxNodeCodeReference,
1507
  fxNodeCodeThis
1508
};
1509
static const txNodeDispatch gxWhileNodeDispatch ICACHE_FLASH_ATTR = {
1510
  fxWhileNodeDistribute,
1511
  fxNodeBind,
1512
  fxNodeHoist,
1513
  fxWhileNodeCode,
1514
  fxNodeCodeAssign,
1515
  fxNodeCodeDelete,
1516
  fxNodeCodeReference,
1517
  fxNodeCodeThis
1518
};
1519
static const txNodeDispatch gxWithNodeDispatch ICACHE_FLASH_ATTR = {
1520
  fxWithNodeDistribute,
1521
  fxWithNodeBind,
1522
  fxWithNodeHoist,
1523
  fxWithNodeCode,
1524
  fxNodeCodeAssign,
1525
  fxNodeCodeDelete,
1526
  fxNodeCodeReference,
1527
  fxNodeCodeThis
1528
};
1529
static const txNodeDispatch  gxYieldNodeDispatch ICACHE_FLASH_ATTR = {
1530
  fxStatementNodeDistribute,
1531
  fxNodeBind,
1532
  fxNodeHoist,
1533
  fxYieldNodeCode,
1534
  fxNodeCodeAssign,
1535
  fxNodeCodeDelete,
1536
  fxNodeCodeReference,
1537
  fxNodeCodeThis
1538
};
1539
1540
const txNodeDescription gxTokenDescriptions[XS_TOKEN_COUNT] ICACHE_FLASH_ATTR = {
1541
  { XS_NO_CODE, XS_NO_TOKEN, "", 0, NULL },
1542
  { XS_NO_CODE, XS_TOKEN_ACCESS, "Access", sizeof(txAccessNode), &gxAccessNodeDispatch },
1543
  { XS_CODE_ADD, XS_TOKEN_ADD, "Add", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1544
  { XS_CODE_ADD, XS_TOKEN_ADD_ASSIGN, "AddAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1545
  { XS_NO_CODE, XS_TOKEN_AND, "And", sizeof(txBinaryExpressionNode), &gxAndExpressionNodeDispatch },
1546
  { XS_NO_CODE, XS_TOKEN_AND_ASSIGN, "AndAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1547
  { XS_NO_CODE, XS_TOKEN_ARG, "Arg", sizeof(txDeclareNode), &gxDeclareNodeDispatch },
1548
  { XS_NO_CODE, XS_TOKEN_ARGUMENTS, "Arguments", sizeof(txNode), &gxArgumentsNodeDispatch },
1549
  { XS_CODE_ARGUMENTS_SLOPPY, XS_TOKEN_ARGUMENTS_SLOPPY, "Arguments", sizeof(txNode), &gxValueNodeDispatch },
1550
  { XS_CODE_ARGUMENTS_STRICT, XS_TOKEN_ARGUMENTS_STRICT, "Arguments", sizeof(txNode), &gxValueNodeDispatch },
1551
  { XS_NO_CODE, XS_TOKEN_ARRAY, "Array", sizeof(txArrayNode), &gxArrayNodeDispatch },
1552
  { XS_NO_CODE, XS_TOKEN_ARRAY_BINDING, "ArrayBinding", sizeof(txArrayBindingNode), &gxArrayBindingNodeDispatch },
1553
  { XS_NO_CODE, XS_TOKEN_ARROW, "", 0, NULL },
1554
  { XS_NO_CODE, XS_TOKEN_ASSIGN, "Assign", sizeof(txAssignNode), &gxAssignNodeDispatch },
1555
  { XS_NO_CODE, XS_TOKEN_AWAIT, "Await", sizeof(txStatementNode), &gxAwaitNodeDispatch },
1556
  { XS_NO_CODE, XS_TOKEN_BIGINT, "BigInt", sizeof(txBigIntNode), &gxBigIntNodeDispatch },
1557
  { XS_NO_CODE, XS_TOKEN_BINDING, "Binding", sizeof(txBindingNode), &gxBindingNodeDispatch },
1558
  { XS_CODE_BIT_AND, XS_TOKEN_BIT_AND, "BitAnd", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1559
  { XS_CODE_BIT_AND, XS_TOKEN_BIT_AND_ASSIGN, "BitAndAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1560
  { XS_CODE_BIT_NOT, XS_TOKEN_BIT_NOT, "BitNot", sizeof(txUnaryExpressionNode), &gxUnaryExpressionNodeDispatch },
1561
  { XS_CODE_BIT_OR, XS_TOKEN_BIT_OR, "BitOr", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1562
  { XS_CODE_BIT_OR, XS_TOKEN_BIT_OR_ASSIGN, "BitOrAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1563
  { XS_CODE_BIT_XOR, XS_TOKEN_BIT_XOR, "BitXor", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1564
  { XS_CODE_BIT_XOR, XS_TOKEN_BIT_XOR_ASSIGN, "BitXorAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1565
  { XS_NO_CODE, XS_TOKEN_BLOCK, "Block", sizeof(txBlockNode), &gxBlockNodeDispatch },
1566
  { XS_NO_CODE, XS_TOKEN_BODY, "Body", sizeof(txBodyNode), &gxBodyNodeDispatch },
1567
  { XS_NO_CODE, XS_TOKEN_BREAK, "Break", sizeof(txBreakContinueNode), &gxBreakContinueNodeDispatch },
1568
  { XS_CODE_CALL, XS_TOKEN_CALL, "Call", sizeof(txCallNewNode), &gxCallNodeDispatch },
1569
  { XS_NO_CODE, XS_TOKEN_CASE, "Case", sizeof(txCaseNode), &gxCaseNodeDispatch },
1570
  { XS_NO_CODE, XS_TOKEN_CATCH, "Catch", sizeof(txCatchNode), &gxCatchNodeDispatch },
1571
  { XS_NO_CODE, XS_TOKEN_CHAIN, "Chain", sizeof(txUnaryExpressionNode), &gxChainNodeDispatch },
1572
  { XS_NO_CODE, XS_TOKEN_CLASS, "Class", sizeof(txClassNode), &gxClassNodeDispatch },
1573
  { XS_NO_CODE, XS_TOKEN_COALESCE, "Coalesce", sizeof(txBinaryExpressionNode), &gxCoalesceExpressionNodeDispatch },
1574
  { XS_NO_CODE, XS_TOKEN_COALESCE_ASSIGN, "CoalesceAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1575
  { XS_NO_CODE, XS_TOKEN_COLON, "", 0, NULL },
1576
  { XS_NO_CODE, XS_TOKEN_COMMA, "", 0, NULL },
1577
  { XS_NO_CODE, XS_TOKEN_CONST, "Const", sizeof(txDeclareNode), &gxDeclareNodeDispatch },
1578
  { XS_NO_CODE, XS_TOKEN_CONTINUE, "Continue", sizeof(txBreakContinueNode), &gxBreakContinueNodeDispatch },
1579
  { XS_CODE_CURRENT, XS_TOKEN_CURRENT, "Current", sizeof(txNode), &gxValueNodeDispatch },
1580
  { XS_CODE_DEBUGGER, XS_TOKEN_DEBUGGER, "Debugger", sizeof(txNode), &gxDebuggerNodeDispatch },
1581
  { XS_CODE_DECREMENT, XS_TOKEN_DECREMENT, "Decrement", sizeof(txPostfixExpressionNode), &gxPostfixExpressionNodeDispatch },
1582
  { XS_NO_CODE, XS_TOKEN_DEFAULT, "", 0, NULL },
1583
  { XS_NO_CODE, XS_TOKEN_DEFINE, "Define", sizeof(txDefineNode), &gxDefineNodeDispatch },
1584
  { XS_NO_CODE, XS_TOKEN_DELEGATE, "Delegate", sizeof(txStatementNode), &gxDelegateNodeDispatch },
1585
  { XS_NO_CODE, XS_TOKEN_DELETE, "Delete", sizeof(txDeleteNode), &gxDeleteNodeDispatch },
1586
  { XS_CODE_DIVIDE, XS_TOKEN_DIVIDE, "Divide", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1587
  { XS_CODE_DIVIDE, XS_TOKEN_DIVIDE_ASSIGN, "DivideAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1588
  { XS_NO_CODE, XS_TOKEN_DO, "Do", sizeof(txDoNode), &gxDoNodeDispatch },
1589
  { XS_NO_CODE, XS_TOKEN_DOT, "", 0, NULL },
1590
  { XS_CODE_UNDEFINED, XS_TOKEN_ELISION, "Elision", sizeof(txNode), &gxValueNodeDispatch },
1591
  { XS_NO_CODE, XS_TOKEN_ELSE, "", 0, NULL },
1592
  { XS_NO_CODE, XS_TOKEN_ENUM, "", 0, NULL },
1593
  { XS_NO_CODE, XS_TOKEN_EOF, "", 0, NULL },
1594
  { XS_CODE_EQUAL, XS_TOKEN_EQUAL, "Equal", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1595
  { XS_CODE_EVAL, XS_TOKEN_EVAL, "", 0, NULL },
1596
  { XS_CODE_EXPONENTIATION, XS_TOKEN_EXPONENTIATION, "Exponent", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1597
  { XS_CODE_EXPONENTIATION, XS_TOKEN_EXPONENTIATION_ASSIGN, "ExponentAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1598
  { XS_NO_CODE, XS_TOKEN_EXPORT, "Export", sizeof(txExportNode), &gxExportNodeDispatch },
1599
  { XS_NO_CODE, XS_TOKEN_EXPRESSIONS, "Expressions", sizeof(txExpressionsNode), &gxExpressionsNodeDispatch },
1600
  { XS_NO_CODE, XS_TOKEN_EXTENDS, "", 0, NULL },
1601
  { XS_CODE_FALSE, XS_TOKEN_FALSE, "False", sizeof(txNode), &gxValueNodeDispatch },
1602
  { XS_NO_CODE, XS_TOKEN_FIELD, "Field", sizeof(txFieldNode), &gxFieldNodeDispatch },
1603
  { XS_NO_CODE, XS_TOKEN_FINALLY, "", 0, NULL },
1604
  { XS_NO_CODE, XS_TOKEN_FOR, "For", sizeof(txForNode), &gxForNodeDispatch },
1605
  { XS_CODE_FOR_AWAIT_OF, XS_TOKEN_FOR_AWAIT_OF, "ForAwaitOf", sizeof(txForInForOfNode), &gxForInForOfNodeDispatch },
1606
  { XS_CODE_FOR_IN, XS_TOKEN_FOR_IN, "ForIn", sizeof(txForInForOfNode), &gxForInForOfNodeDispatch },
1607
  { XS_CODE_FOR_OF, XS_TOKEN_FOR_OF, "ForOf", sizeof(txForInForOfNode), &gxForInForOfNodeDispatch },
1608
  { XS_NO_CODE, XS_TOKEN_FUNCTION, "Function", sizeof(txFunctionNode), &gxFunctionNodeDispatch },
1609
  { XS_NO_CODE, XS_TOKEN_GENERATOR, "Generator", sizeof(txFunctionNode), &gxFunctionNodeDispatch },
1610
  { XS_NO_CODE, XS_TOKEN_GETTER, "Getter", sizeof(txFunctionNode), &gxFunctionNodeDispatch },
1611
  { XS_NO_CODE, XS_TOKEN_HOST, "Host", sizeof(txHostNode), &gxHostNodeDispatch },
1612
  { XS_NO_CODE, XS_TOKEN_IDENTIFIER, "", 0, NULL },
1613
  { XS_NO_CODE, XS_TOKEN_IF, "If", sizeof(txIfNode), &gxIfNodeDispatch },
1614
  { XS_NO_CODE, XS_TOKEN_IMPLEMENTS, "", 0, NULL },
1615
  { XS_NO_CODE, XS_TOKEN_IMPORT, "Import", sizeof(txImportNode), &gxImportNodeDispatch },
1616
  { XS_NO_CODE, XS_TOKEN_IMPORT_CALL, "ImportCall", sizeof(txImportCallNode), &gxImportCallNodeDispatch },
1617
  { XS_NO_CODE, XS_TOKEN_IMPORT_META, "ImportMeta", sizeof(txNode), &gxImportMetaNodeDispatch },
1618
  { XS_CODE_IN, XS_TOKEN_IN, "In", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1619
  { XS_NO_CODE, XS_TOKEN_INCLUDE, "include", sizeof(txIncludeNode), &gxIncludeNodeDispatch },
1620
  { XS_CODE_INCREMENT, XS_TOKEN_INCREMENT, "Increment", sizeof(txPostfixExpressionNode), &gxPostfixExpressionNodeDispatch },
1621
  { XS_CODE_INSTANCEOF, XS_TOKEN_INSTANCEOF, "Instanceof", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1622
  { XS_NO_CODE, XS_TOKEN_INTEGER, "Integer", sizeof(txIntegerNode), &gxIntegerNodeDispatch },
1623
  { XS_NO_CODE, XS_TOKEN_INTERFACE, "", 0, NULL },
1624
  { XS_NO_CODE, XS_TOKEN_ITEMS, "Items", 0, NULL },
1625
  { XS_NO_CODE, XS_TOKEN_LABEL, "Label", sizeof(txLabelNode), &gxLabelNodeDispatch },
1626
  { XS_NO_CODE, XS_TOKEN_LEFT_BRACE, "", 0, NULL },
1627
  { XS_NO_CODE, XS_TOKEN_LEFT_BRACKET, "", 0, NULL },
1628
  { XS_NO_CODE, XS_TOKEN_LEFT_PARENTHESIS, "", 0, NULL },
1629
  { XS_CODE_LEFT_SHIFT, XS_TOKEN_LEFT_SHIFT, "LeftShift", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1630
  { XS_CODE_LEFT_SHIFT, XS_TOKEN_LEFT_SHIFT_ASSIGN, "LeftShiftAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1631
  { XS_CODE_LESS, XS_TOKEN_LESS, "Less", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1632
  { XS_CODE_LESS_EQUAL, XS_TOKEN_LESS_EQUAL, "LessEqual", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1633
  { XS_NO_CODE, XS_TOKEN_LET, "Let", sizeof(txDeclareNode), &gxDeclareNodeDispatch },
1634
  { XS_NO_CODE, XS_TOKEN_MEMBER, "Member", sizeof(txMemberNode), &gxMemberNodeDispatch },
1635
  { XS_NO_CODE, XS_TOKEN_MEMBER_AT, "MemberAt", sizeof(txMemberAtNode), &gxMemberAtNodeDispatch },
1636
  { XS_CODE_MINUS, XS_TOKEN_MINUS, "Minus", sizeof(txUnaryExpressionNode), &gxUnaryExpressionNodeDispatch },
1637
  { XS_NO_CODE, XS_TOKEN_MODULE, "Module", sizeof(txModuleNode), &gxModuleNodeDispatch },
1638
  { XS_CODE_MODULO, XS_TOKEN_MODULO, "Modulo", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1639
  { XS_CODE_MODULO, XS_TOKEN_MODULO_ASSIGN, "ModuloAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1640
  { XS_CODE_MORE, XS_TOKEN_MORE, "More", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1641
  { XS_CODE_MORE_EQUAL, XS_TOKEN_MORE_EQUAL, "MoreEqual", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1642
  { XS_CODE_MULTIPLY, XS_TOKEN_MULTIPLY, "Multiply", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1643
  { XS_CODE_MULTIPLY, XS_TOKEN_MULTIPLY_ASSIGN, "MultiplyAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1644
  { XS_CODE_NEW, XS_TOKEN_NEW, "New", sizeof(txCallNewNode), &gxNewNodeDispatch }, 
1645
  { XS_CODE_NOT, XS_TOKEN_NOT, "Not", sizeof(txUnaryExpressionNode), &gxUnaryExpressionNodeDispatch },
1646
  { XS_CODE_NOT_EQUAL, XS_TOKEN_NOT_EQUAL, "NotEqual", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1647
  { XS_CODE_NULL, XS_TOKEN_NULL, "Null", sizeof(txNode), &gxValueNodeDispatch }, 
1648
  { XS_NO_CODE, XS_TOKEN_NUMBER, "Number", sizeof(txNumberNode), &gxNumberNodeDispatch },
1649
  { XS_NO_CODE, XS_TOKEN_OBJECT, "Object", sizeof(txObjectNode), &gxObjectNodeDispatch },
1650
  { XS_NO_CODE, XS_TOKEN_OBJECT_BINDING, "ObjectBinding", sizeof(txObjectBindingNode), &gxObjectBindingNodeDispatch },
1651
  { XS_NO_CODE, XS_TOKEN_OPTION, "Option", sizeof(txUnaryExpressionNode), &gxOptionNodeDispatch },
1652
  { XS_NO_CODE, XS_TOKEN_OR, "Or", sizeof(txBinaryExpressionNode), &gxOrExpressionNodeDispatch },
1653
  { XS_NO_CODE, XS_TOKEN_OR_ASSIGN, "OrAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1654
  { XS_NO_CODE, XS_TOKEN_PACKAGE, "", 0, NULL },
1655
  { XS_NO_CODE, XS_TOKEN_PARAMS, "Params", sizeof(txParamsNode), &gxParamsNodeDispatch },
1656
  { XS_NO_CODE, XS_TOKEN_PARAMS_BINDING, "ParamsBinding", sizeof(txParamsBindingNode), &gxParamsBindingNodeDispatch },
1657
  { XS_CODE_PLUS, XS_TOKEN_PLUS, "Plus", sizeof(txUnaryExpressionNode), &gxUnaryExpressionNodeDispatch },
1658
  { XS_NO_CODE, XS_TOKEN_PRIVATE, "", 0, NULL },
1659
  { XS_NO_CODE, XS_TOKEN_PRIVATE_IDENTIFIER, "PrivateIdenfifier", sizeof(txPrivateMemberNode), &gxPrivateIdentifierNodeDispatch },
1660
  { XS_NO_CODE, XS_TOKEN_PRIVATE_MEMBER, "PrivateMember", sizeof(txPrivateMemberNode), &gxPrivateMemberNodeDispatch },
1661
  { XS_NO_CODE, XS_TOKEN_PRIVATE_PROPERTY, "PrivateProperty", sizeof(txPrivatePropertyNode), &gxPrivatePropertyNodeDispatch },
1662
  { XS_NO_CODE, XS_TOKEN_PROGRAM, "Program", sizeof(txProgramNode), &gxProgramNodeDispatch },
1663
  { XS_NO_CODE, XS_TOKEN_PROPERTY, "Property", sizeof(txPropertyNode), &gxPropertyNodeDispatch },
1664
  { XS_NO_CODE, XS_TOKEN_PROPERTY_AT, "PropertyAt", sizeof(txPropertyAtNode), &gxPropertyAtNodeDispatch },
1665
  { XS_NO_CODE, XS_TOKEN_PROPERTY_BINDING, "PropertyBinding", sizeof(txPropertyBindingNode), &gxPropertyBindingNodeDispatch },
1666
  { XS_NO_CODE, XS_TOKEN_PROPERTY_BINDING_AT, "PropertyBindingAt", sizeof(txPropertyBindingAtNode), &gxPropertyBindingAtNodeDispatch },
1667
  { XS_NO_CODE, XS_TOKEN_PROTECTED, "", 0, NULL },
1668
  { XS_NO_CODE, XS_TOKEN_PUBLIC, "", 0, NULL },
1669
  { XS_NO_CODE, XS_TOKEN_QUESTION_MARK, "QuestionMark", sizeof(txQuestionMarkNode), &gxQuestionMarkNodeDispatch },
1670
  { XS_NO_CODE, XS_TOKEN_REGEXP, "Regexp", sizeof(txRegexpNode), &gxRegexpNodeDispatch },
1671
  { XS_NO_CODE, XS_TOKEN_REST_BINDING, "RestBinding", sizeof(txRestBindingNode), &gxRestBindingNodeDispatch },
1672
  { XS_NO_CODE, XS_TOKEN_RETURN, "Return", sizeof(txStatementNode), &gxReturnNodeDispatch },
1673
  { XS_NO_CODE, XS_TOKEN_RIGHT_BRACE, "", 0, NULL },
1674
  { XS_NO_CODE, XS_TOKEN_RIGHT_BRACKET, "", 0, NULL },
1675
  { XS_NO_CODE, XS_TOKEN_RIGHT_PARENTHESIS, "", 0, NULL },
1676
  { XS_NO_CODE, XS_TOKEN_SEMICOLON, "", 0, NULL },
1677
  { XS_NO_CODE, XS_TOKEN_SETTER, "Setter", sizeof(txFunctionNode), &gxFunctionNodeDispatch },
1678
  { XS_NO_CODE, XS_TOKEN_SHORT, "", 0, NULL },
1679
  { XS_CODE_SIGNED_RIGHT_SHIFT, XS_TOKEN_SIGNED_RIGHT_SHIFT, "SignedRightShift", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1680
  { XS_CODE_SIGNED_RIGHT_SHIFT, XS_TOKEN_SIGNED_RIGHT_SHIFT_ASSIGN, "SignedRightShiftAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1681
  { XS_NO_CODE, XS_TOKEN_SKIP_BINDING, "SkipBinding", sizeof(txSkipBindingNode), &gxSkipBindingNodeDispatch },
1682
  { XS_NO_CODE, XS_TOKEN_SPECIFIER, "Specifier", sizeof(txSpecifierNode), &gxSpecifierNodeDispatch },
1683
  { XS_NO_CODE, XS_TOKEN_SPREAD, "Spread", sizeof(txSpreadNode), &gxSpreadNodeDispatch },
1684
  { XS_NO_CODE, XS_TOKEN_STATEMENT, "Statement", sizeof(txStatementNode), &gxStatementNodeDispatch },
1685
  { XS_NO_CODE, XS_TOKEN_STATEMENTS, "Statements", sizeof(txStatementsNode), &gxStatementsNodeDispatch },
1686
  { XS_NO_CODE, XS_TOKEN_STATIC, "", 0, NULL },
1687
  { XS_CODE_STRICT_EQUAL, XS_TOKEN_STRICT_EQUAL, "StrictEqual", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1688
  { XS_CODE_STRICT_NOT_EQUAL, XS_TOKEN_STRICT_NOT_EQUAL, "StrictNotEqual", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1689
  { XS_NO_CODE, XS_TOKEN_STRING, "String", sizeof(txStringNode), &gxStringNodeDispatch },
1690
  { XS_CODE_SUBTRACT, XS_TOKEN_SUBTRACT, "Subtract", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1691
  { XS_CODE_SUBTRACT, XS_TOKEN_SUBTRACT_ASSIGN, "SubtractAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1692
  { XS_CODE_SUPER, XS_TOKEN_SUPER, "Super", sizeof(txSuperNode), &gxSuperNodeDispatch },
1693
  { XS_NO_CODE, XS_TOKEN_SWITCH, "Switch", sizeof(txSwitchNode), &gxSwitchNodeDispatch },
1694
  { XS_CODE_TARGET, XS_TOKEN_TARGET, "Target", sizeof(txNode), &gxTargetNodeDispatch },
1695
  { XS_NO_CODE, XS_TOKEN_TEMPLATE, "Template", sizeof(txTemplateNode), &gxTemplateNodeDispatch },
1696
  { XS_NO_CODE, XS_TOKEN_TEMPLATE_HEAD, "", 0, NULL },
1697
  { XS_NO_CODE, XS_TOKEN_TEMPLATE_MIDDLE, "TemplateItem", sizeof(txTemplateItemNode), &gxTemplateItemNodeDispatch },
1698
  { XS_NO_CODE, XS_TOKEN_TEMPLATE_TAIL, "", 0, NULL },
1699
  { XS_CODE_THIS, XS_TOKEN_THIS, "This", sizeof(txNode), &gxThisNodeDispatch },
1700
  { XS_NO_CODE, XS_TOKEN_THROW, "Throw", sizeof(txStatementNode), &gxThrowNodeDispatch },
1701
  { XS_CODE_TRUE, XS_TOKEN_TRUE, "True", sizeof(txNode), &gxValueNodeDispatch },
1702
  { XS_NO_CODE, XS_TOKEN_TRY, "Try", sizeof(txTryNode), &gxTryNodeDispatch },
1703
  { XS_CODE_TYPEOF, XS_TOKEN_TYPEOF, "Typeof", sizeof(txUnaryExpressionNode), &gxUnaryExpressionNodeDispatch },
1704
  { XS_CODE_UNDEFINED, XS_TOKEN_UNDEFINED, "Undefined", sizeof(txNode), &gxUndefinedNodeDispatch },
1705
  { XS_CODE_UNSIGNED_RIGHT_SHIFT, XS_TOKEN_UNSIGNED_RIGHT_SHIFT, "UnsignedRightShift", sizeof(txBinaryExpressionNode), &gxBinaryExpressionNodeDispatch },
1706
  { XS_CODE_UNSIGNED_RIGHT_SHIFT, XS_TOKEN_UNSIGNED_RIGHT_SHIFT_ASSIGN, "UnsignedRightShiftAssign", sizeof(txAssignNode), &gxCompoundExpressionNodeDispatch },
1707
  { XS_NO_CODE, XS_TOKEN_USING, "Using", sizeof(txDeclareNode), &gxDeclareNodeDispatch },
1708
  { XS_NO_CODE, XS_TOKEN_VAR, "Var", sizeof(txDeclareNode), &gxDeclareNodeDispatch },
1709
  { XS_CODE_VOID, XS_TOKEN_VOID, "Void", sizeof(txUnaryExpressionNode), &gxUnaryExpressionNodeDispatch },
1710
  { XS_NO_CODE, XS_TOKEN_WHILE, "While", sizeof(txWhileNode), &gxWhileNodeDispatch },
1711
  { XS_NO_CODE, XS_TOKEN_WITH, "With", sizeof(txWithNode), &gxWithNodeDispatch },
1712
  { XS_NO_CODE, XS_TOKEN_YIELD, "Yield", sizeof(txStatementNode), &gxYieldNodeDispatch },
1713
};
1714
1715
#ifdef mxTreePrint
1716
1717
void fxTreePrint(txParser* parser, txNode* node)
1718
{
1719
  txPrinter printer;
1720
  printer.tabs = 0;
1721
  fxNodePrintTree(node, &printer);
1722
  fprintf(stderr, "\n");
1723
}
1724
1725
void fxNodePrintTree(void* it, void* param) 
1726
{
1727
  txNode* node = it;
1728
  txPrinter* printer = param;
1729
  txInteger tabs = printer->tabs;
1730
  fprintf(stderr, "\n");
1731
  while (tabs) {
1732
    fprintf(stderr, "\t");
1733
    tabs--;
1734
  }
1735
  if (node) {
1736
    switch (node->description->token) {
1737
    case XS_TOKEN_ACCESS: 
1738
      fxAccessNodePrintNode(it); 
1739
      break;
1740
    case XS_TOKEN_ARG: 
1741
    case XS_TOKEN_CONST: 
1742
    case XS_TOKEN_DEFINE: 
1743
    case XS_TOKEN_LET: 
1744
    case XS_TOKEN_USING: 
1745
    case XS_TOKEN_VAR: 
1746
      fxDeclareDefineNodePrintNode(it); 
1747
      break;
1748
    case XS_TOKEN_EXPORT: 
1749
      fxExportNodePrintNode(it); 
1750
      break;
1751
    case XS_TOKEN_IMPORT: 
1752
      fxImportNodePrintNode(it); 
1753
      break;
1754
    case XS_TOKEN_INTEGER: 
1755
      fxIntegerNodePrintNode(it); 
1756
      break;
1757
    case XS_TOKEN_FUNCTION: 
1758
      fxFunctionNodePrintNode(it); 
1759
      break;
1760
    case XS_TOKEN_LABEL: 
1761
      fxLabelNodePrintNode(it); 
1762
      break;
1763
    case XS_TOKEN_MEMBER: 
1764
      fxMemberNodePrintNode(it); 
1765
      break;
1766
    case XS_TOKEN_NUMBER: 
1767
      fxNumberNodePrintNode(it); 
1768
      break;
1769
    case XS_TOKEN_PROPERTY: 
1770
      fxPropertyNodePrintNode(it); 
1771
      break;
1772
    case XS_TOKEN_PROPERTY_BINDING: 
1773
      fxPropertyBindingNodePrintNode(it); 
1774
      break;
1775
    case XS_TOKEN_SPECIFIER: 
1776
      fxSpecifierNodePrintNode(it); 
1777
      break;
1778
    case XS_TOKEN_STRING: 
1779
      fxStringNodePrintNode(it); 
1780
      break;
1781
    default: 
1782
      fxNodePrintNode(it); 
1783
      break;
1784
    }
1785
    if (node->flags) {
1786
      fprintf(stderr, " [");
1787
      if (node->flags & mxArgumentsFlag)
1788
        fprintf(stderr, " arguments");
1789
      if (node->flags & mxArrowFlag)
1790
        fprintf(stderr, " arrow");
1791
      if (node->flags & mxAsyncFlag)
1792
        fprintf(stderr, " async");
1793
      if (node->flags & mxAwaitingFlag)
1794
        fprintf(stderr, " await");
1795
      if (node->flags & mxBaseFlag)
1796
        fprintf(stderr, " base");
1797
      if (node->flags & mxDerivedFlag)
1798
        fprintf(stderr, " derived");
1799
      if (node->flags & mxEvalFlag)
1800
        fprintf(stderr, " eval");
1801
      if (node->flags & mxFieldFlag)
1802
        fprintf(stderr, " field");
1803
      if (node->flags & mxTargetFlag)
1804
        fprintf(stderr, " function");
1805
      if (node->flags & mxGeneratorFlag)
1806
        fprintf(stderr, " generator");
1807
      if (node->flags & mxGetterFlag)
1808
        fprintf(stderr, " getter");
1809
      if (node->flags & mxMethodFlag)
1810
        fprintf(stderr, " method");
1811
      if (node->flags & mxSetterFlag)
1812
        fprintf(stderr, " setter");
1813
      if (node->flags & mxStaticFlag)
1814
        fprintf(stderr, " static");
1815
      if (node->flags & mxStrictFlag)
1816
        fprintf(stderr, " strict");
1817
      if (node->flags & mxSuperFlag)
1818
        fprintf(stderr, " super");
1819
      fprintf(stderr, " ]");
1820
    }
1821
    printer->tabs++;
1822
    (*node->description->dispatch->distribute)(node, fxNodePrintTree, param);
1823
    printer->tabs--;
1824
  }
1825
  else
1826
    fprintf(stderr, "NULL");
1827
}
1828
1829
1830
void fxNodePrintNode(void* it) 
1831
{
1832
  txNode* node = it;
1833
  fprintf(stderr, "%s", node->description->name);
1834
}
1835
1836
void fxAccessNodePrintNode(void* it) 
1837
{
1838
  txAccessNode* node = it;
1839
  fprintf(stderr, "%s %s", node->description->name, node->symbol->string);
1840
}
1841
1842
void fxDeclareDefineNodePrintNode(void* it) 
1843
{
1844
  txDeclareNode* node = it;
1845
  fprintf(stderr, "%s %s", node->description->name, node->symbol->string);
1846
}
1847
1848
void fxExportNodePrintNode(void* it) 
1849
{
1850
  txExportNode* node = it;
1851
  fprintf(stderr, "%s ", node->description->name);
1852
  if (node->from)
1853
    fprintf(stderr, "\"%s\" ", ((txStringNode*)node->from)->value);
1854
  if (!node->specifiers)
1855
    fprintf(stderr, "* ");
1856
}
1857
1858
void fxFunctionNodePrintNode(void* it) 
1859
{
1860
  txFunctionNode* node = it;
1861
    fprintf(stderr, "%s", node->description->name);
1862
    if (node->symbol)
1863
        fprintf(stderr, " %s", node->symbol->string);
1864
}
1865
1866
void fxImportNodePrintNode(void* it) 
1867
{
1868
  txImportNode* node = it;
1869
  fprintf(stderr, "%s ", node->description->name);
1870
  if (node->from)
1871
    fprintf(stderr, "\"%s\" ", ((txStringNode*)node->from)->value);
1872
  else
1873
    fprintf(stderr, "\"?\" ");
1874
}
1875
1876
void fxIntegerNodePrintNode(void* it) 
1877
{
1878
  txIntegerNode* node = it;
1879
  fprintf(stderr, "%s %d", node->description->name, node->value);
1880
}
1881
1882
void fxLabelNodePrintNode(void* it) 
1883
{
1884
  txLabelNode* node = it;
1885
    fprintf(stderr, "%s", node->description->name);
1886
    if (node->symbol)
1887
        fprintf(stderr, " %s", node->symbol->string);
1888
}
1889
1890
void fxMemberNodePrintNode(void* it) 
1891
{
1892
  txMemberNode* node = it;
1893
  fprintf(stderr, "%s %s", node->description->name, node->symbol->string);
1894
}
1895
1896
void fxNumberNodePrintNode(void* it) 
1897
{
1898
  txNumberNode* node = it;
1899
  fprintf(stderr, "%s %lf", node->description->name, node->value);
1900
}
1901
1902
void fxPropertyNodePrintNode(void* it) 
1903
{
1904
  txPropertyNode* node = it;
1905
  fprintf(stderr, "%s %s", node->description->name, node->symbol->string);
1906
}
1907
1908
void fxPropertyBindingNodePrintNode(void* it) 
1909
{
1910
  txPropertyBindingNode* node = it;
1911
  fprintf(stderr, "%s %s", node->description->name, node->symbol->string);
1912
}
1913
1914
void fxSpecifierNodePrintNode(void* it) 
1915
{
1916
  txSpecifierNode* node = it;
1917
  fprintf(stderr, "%s", node->description->name);
1918
  if (node->symbol)
1919
    fprintf(stderr, " %s", node->symbol->string);
1920
  if (node->asSymbol)
1921
    fprintf(stderr, " as %s", node->asSymbol->string);
1922
}
1923
1924
void fxStringNodePrintNode(void* it) 
1925
{
1926
  txStringNode* node = it;
1927
  fprintf(stderr, "%s \"%s\"", node->description->name, node->value);
1928
}
1929
1930
#endif