19 lines
460 B
JavaScript
19 lines
460 B
JavaScript
module.exports = class Component {
|
|
constructor (address, syntaxTree) {
|
|
this.adr = address;
|
|
this.syntax = syntaxTree;
|
|
}
|
|
|
|
// Run server
|
|
run () {}
|
|
|
|
// Working with domains
|
|
domainAction (context, domain) {}
|
|
|
|
// Call this function where need works with domain (DO NOT REWRITE)
|
|
callDomain (domain, domainST) {
|
|
const component = new domainST.Type(this.adr, domainST);
|
|
return { argv: (...argv) => component.domainAction(this, domain, ...argv) };
|
|
}
|
|
};
|