MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxCheckUniqueProperty

Function fxCheckUniqueProperty

xs/sources/xsSyntaxical.c:4200–4233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4198}
4199
4200void fxCheckUniqueProperty(txParser* parser, txNode* base, txNode* current)
4201{
4202 return; // no more!
4203 if (current->description->token == XS_TOKEN_PROPERTY) {
4204 txPropertyNode* currentNode = (txPropertyNode*)current;
4205 while (base != current) {
4206 txPropertyNode* baseNode = (txPropertyNode*)base;
4207 if (baseNode->description->token == XS_TOKEN_PROPERTY) {
4208 if (baseNode->symbol == currentNode->symbol) {
4209 fxCheckUniquePropertyAux(parser, (txNode*)baseNode, (txNode*)currentNode);
4210 }
4211 }
4212 base = base->next;
4213 }
4214 }
4215 else {
4216 txPropertyAtNode* currentNode = (txPropertyAtNode*)current;
4217 txIntegerNode* currentAt = (txIntegerNode*)(currentNode->at);
4218 if (currentAt->description->token == XS_TOKEN_INTEGER) {
4219 while (base != current) {
4220 txPropertyAtNode* baseNode = (txPropertyAtNode*)base;
4221 if (baseNode->description->token == XS_TOKEN_PROPERTY_AT) {
4222 txIntegerNode* baseAt = (txIntegerNode*)(baseNode->at);
4223 if (baseAt->description->token == XS_TOKEN_INTEGER) {
4224 if (baseAt->value == currentAt->value) {
4225 fxCheckUniquePropertyAux(parser, (txNode*)baseNode, (txNode*)currentNode);
4226 }
4227 }
4228 }
4229 base = base->next;
4230 }
4231 }
4232 }
4233}
4234
4235void fxCheckUniquePropertyAux(txParser* parser, txNode* baseNode, txNode* currentNode)
4236{

Callers 1

fxObjectExpressionFunction · 0.85

Calls 1

fxCheckUniquePropertyAuxFunction · 0.85

Tested by

no test coverage detected