Coverage Report

Created: 2026-03-30 06:33

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