| 91 | } |
| 92 | |
| 93 | void fxInitializeParser(txParser* parser, void* console, txSize bufferSize, txSize symbolModulo) |
| 94 | { |
| 95 | c_memset(parser, 0, sizeof(txParser)); |
| 96 | parser->first = C_NULL; |
| 97 | parser->console = console; |
| 98 | parser->stackLimit = fxCStackLimit(); |
| 99 | |
| 100 | parser->symbolModulo = symbolModulo; |
| 101 | parser->symbolTable = fxNewParserChunkClear(parser, parser->symbolModulo * sizeof(txSymbol*)); |
| 102 | |
| 103 | parser->emptyString = fxNewParserString(parser, "", 0); |
| 104 | |
| 105 | parser->ObjectSymbol = fxNewParserSymbol(parser, "Object"); |
| 106 | parser->__dirnameSymbol = fxNewParserSymbol(parser, "__dirname"); |
| 107 | parser->__filenameSymbol = fxNewParserSymbol(parser, "__filename"); |
| 108 | parser->__jsx__Symbol = fxNewParserSymbol(parser, "__jsx__"); |
| 109 | parser->__proto__Symbol = fxNewParserSymbol(parser, "__proto__"); |
| 110 | parser->allSymbol = fxNewParserSymbol(parser, "*"); |
| 111 | parser->argsSymbol = fxNewParserSymbol(parser, "args"); |
| 112 | parser->argumentsSymbol = fxNewParserSymbol(parser, "arguments"); |
| 113 | parser->arrowSymbol = fxNewParserSymbol(parser, "=>"); |
| 114 | parser->asSymbol = fxNewParserSymbol(parser, "as"); |
| 115 | parser->asyncSymbol = fxNewParserSymbol(parser, "async"); |
| 116 | parser->awaitSymbol = fxNewParserSymbol(parser, "await"); |
| 117 | parser->callSymbol = fxNewParserSymbol(parser, "call"); |
| 118 | parser->callerSymbol = fxNewParserSymbol(parser, "caller"); |
| 119 | parser->constructorSymbol = fxNewParserSymbol(parser, "constructor"); |
| 120 | parser->defaultSymbol = fxNewParserSymbol(parser, "default"); |
| 121 | parser->doneSymbol = fxNewParserSymbol(parser, "done"); |
| 122 | parser->evalSymbol = fxNewParserSymbol(parser, "eval"); |
| 123 | parser->exportsSymbol = fxNewParserSymbol(parser, "exports"); |
| 124 | parser->fillSymbol = fxNewParserSymbol(parser, "fill"); |
| 125 | parser->freezeSymbol = fxNewParserSymbol(parser, "freeze"); |
| 126 | parser->fromSymbol = fxNewParserSymbol(parser, "from"); |
| 127 | parser->getSymbol = fxNewParserSymbol(parser, "get"); |
| 128 | parser->idSymbol = fxNewParserSymbol(parser, "id"); |
| 129 | parser->includeSymbol = fxNewParserSymbol(parser, "include"); |
| 130 | parser->InfinitySymbol = fxNewParserSymbol(parser, "Infinity"); |
| 131 | parser->jsonSymbol = fxNewParserSymbol(parser, "json"); |
| 132 | parser->lengthSymbol = fxNewParserSymbol(parser, "length"); |
| 133 | parser->letSymbol = fxNewParserSymbol(parser, "let"); |
| 134 | parser->metaSymbol = fxNewParserSymbol(parser, "meta"); |
| 135 | parser->moduleSymbol = fxNewParserSymbol(parser, "module"); |
| 136 | parser->nameSymbol = fxNewParserSymbol(parser, "name"); |
| 137 | parser->NaNSymbol = fxNewParserSymbol(parser, "NaN"); |
| 138 | parser->NativeSymbol = fxNewParserSymbol(parser, "Native"); |
| 139 | parser->nativeSymbol = fxNewParserSymbol(parser, "native"); |
| 140 | parser->nextSymbol = fxNewParserSymbol(parser, "next"); |
| 141 | parser->newTargetSymbol = fxNewParserSymbol(parser, "new.target"); |
| 142 | parser->ofSymbol = fxNewParserSymbol(parser, "of"); |
| 143 | parser->privateConstructorSymbol = fxNewParserSymbol(parser, "#constructor"); |
| 144 | parser->prototypeSymbol = fxNewParserSymbol(parser, "prototype"); |
| 145 | parser->RangeErrorSymbol = fxNewParserSymbol(parser, "RangeError"); |
| 146 | parser->rawSymbol = fxNewParserSymbol(parser, "raw"); |
| 147 | parser->returnSymbol = fxNewParserSymbol(parser, "return"); |
| 148 | parser->setSymbol = fxNewParserSymbol(parser, "set"); |
| 149 | parser->sliceSymbol = fxNewParserSymbol(parser, "slice"); |
| 150 | parser->SyntaxErrorSymbol = fxNewParserSymbol(parser, "SyntaxError"); |
no test coverage detected