(InstanceScope scope, String name, int nargs)
| 450 | // TODO: refactor to remove dup'd code |
| 451 | |
| 452 | void super_new(InstanceScope scope, String name, int nargs) { |
| 453 | final ST self = scope.st; |
| 454 | ST st = null; |
| 455 | CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name); |
| 456 | if ( imported==null ) { |
| 457 | errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE, name); |
| 458 | st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST()); |
| 459 | } |
| 460 | else { |
| 461 | st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name); |
| 462 | st.groupThatCreatedThisInstance = group; |
| 463 | } |
| 464 | // get n args and store into st's attr list |
| 465 | storeArgs(scope, nargs, st); |
| 466 | sp -= nargs; |
| 467 | operands[++sp] = st; |
| 468 | } |
| 469 | |
| 470 | void super_new(InstanceScope scope, String name, Map<String, Object> attrs) { |
| 471 | final ST self = scope.st; |
no test coverage detected