(InstanceScope scope, String name, int nargs)
| 496 | // TODO: refactor to remove dup'd code |
| 497 | |
| 498 | void super_new(InstanceScope scope, String name, int nargs) { |
| 499 | final ST self = scope.st; |
| 500 | ST st = null; |
| 501 | CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name); |
| 502 | if ( imported==null ) { |
| 503 | errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE, name); |
| 504 | st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST()); |
| 505 | } |
| 506 | else { |
| 507 | st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name); |
| 508 | st.groupThatCreatedThisInstance = group; |
| 509 | } |
| 510 | // get n args and store into st's attr list |
| 511 | storeArgs(scope, nargs, st); |
| 512 | sp -= nargs; |
| 513 | operands[++sp] = st; |
| 514 | } |
| 515 | |
| 516 | void super_new(InstanceScope scope, String name, Map<String, Object> attrs) { |
| 517 | final ST self = scope.st; |
no test coverage detected