| 4121 | } |
| 4122 | |
| 4123 | void fxCheckStrictBinding(txParser* parser, txNode* node) |
| 4124 | { |
| 4125 | if (node && node->description) { |
| 4126 | if (node->description->token == XS_TOKEN_ACCESS) { |
| 4127 | fxCheckStrictSymbol(parser, ((txAccessNode*)node)->symbol); |
| 4128 | } |
| 4129 | else if (node->description->token == XS_TOKEN_ARG) { |
| 4130 | fxCheckStrictSymbol(parser, ((txDeclareNode*)node)->symbol); |
| 4131 | } |
| 4132 | else if (node->description->token == XS_TOKEN_CONST) { |
| 4133 | fxCheckStrictSymbol(parser, ((txDeclareNode*)node)->symbol); |
| 4134 | } |
| 4135 | else if (node->description->token == XS_TOKEN_LET) { |
| 4136 | fxCheckStrictSymbol(parser, ((txDeclareNode*)node)->symbol); |
| 4137 | } |
| 4138 | else if (node->description->token == XS_TOKEN_USING) { |
| 4139 | fxCheckStrictSymbol(parser, ((txDeclareNode*)node)->symbol); |
| 4140 | } |
| 4141 | else if (node->description->token == XS_TOKEN_VAR) { |
| 4142 | fxCheckStrictSymbol(parser, ((txDeclareNode*)node)->symbol); |
| 4143 | } |
| 4144 | else if (node->description->token == XS_TOKEN_BINDING) { |
| 4145 | fxCheckStrictBinding(parser, ((txBindingNode*)node)->target); |
| 4146 | } |
| 4147 | else if (node->description->token == XS_TOKEN_ARRAY_BINDING) { |
| 4148 | node = ((txArrayBindingNode*)node)->items->first; |
| 4149 | while (node) { |
| 4150 | fxCheckStrictBinding(parser, node); |
| 4151 | node = node->next; |
| 4152 | } |
| 4153 | } |
| 4154 | else if (node->description->token == XS_TOKEN_OBJECT_BINDING) { |
| 4155 | node = ((txObjectBindingNode*)node)->items->first; |
| 4156 | while (node) { |
| 4157 | fxCheckStrictBinding(parser, node); |
| 4158 | node = node->next; |
| 4159 | } |
| 4160 | } |
| 4161 | else if (node->description->token == XS_TOKEN_PARAMS_BINDING) { |
| 4162 | node = ((txParamsBindingNode*)node)->items->first; |
| 4163 | while (node) { |
| 4164 | fxCheckStrictBinding(parser, node); |
| 4165 | node = node->next; |
| 4166 | } |
| 4167 | } |
| 4168 | else if (node->description->token == XS_TOKEN_PROPERTY_BINDING) |
| 4169 | fxCheckStrictBinding(parser, ((txPropertyBindingNode*)node)->binding); |
| 4170 | else if (node->description->token == XS_TOKEN_PROPERTY_BINDING_AT) |
| 4171 | fxCheckStrictBinding(parser, ((txPropertyBindingAtNode*)node)->binding); |
| 4172 | else if (node->description->token == XS_TOKEN_REST_BINDING) |
| 4173 | fxCheckStrictBinding(parser, ((txRestBindingNode*)node)->binding); |
| 4174 | } |
| 4175 | } |
| 4176 | |
| 4177 | void fxCheckStrictFunction(txParser* parser, txFunctionNode* function) |
| 4178 | { |
no test coverage detected