(node)
| 536 | } |
| 537 | |
| 538 | function onDeclare(node) { |
| 539 | const args = node.arguments; |
| 540 | if (args.length > 0) { |
| 541 | const value = getStringValue(args[0]); |
| 542 | if (value !== undefined) { |
| 543 | const name = fromUI5LegacyName(value); |
| 544 | if ( nModuleDeclarations === 1 && !mainModuleFound) { |
| 545 | // if this is the first declaration, then this is the main module declaration |
| 546 | // note that this overrides an already given name |
| 547 | setMainModuleInfo(name, getDocumentation(node)); |
| 548 | } else if ( nModuleDeclarations > 1 && name === info.name ) { |
| 549 | // ignore duplicate declarations (e.g. in behavior file of design time controls) |
| 550 | log.warn(`Duplicate declaration of module name at ${getLocation(args)} in ${name}`); |
| 551 | } else { |
| 552 | // otherwise it is just a submodule declaration |
| 553 | info.addSubModule(name); |
| 554 | } |
| 555 | return; |
| 556 | } else { |
| 557 | log.error( |
| 558 | `jQuery.sap.declare: Module name could not be determined from first argument: ${args[0]}`); |
| 559 | } |
| 560 | } else { |
| 561 | log.error("jQuery.sap.declare: Module name could not be determined, no arguments are given"); |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | function onDefine(defineCall) { |
| 566 | const args = defineCall.arguments; |
nothing calls this directly
no test coverage detected