All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.prompto.declaration.SetterMethodDeclaration.js Maven / Gradle / Ivy

var ConcreteMethodDeclaration = require("./ConcreteMethodDeclaration").ConcreteMethodDeclaration;

function SetterMethodDeclaration(id, statements) {
    ConcreteMethodDeclaration.call(this, id, null, null, statements);
	return this;
}

SetterMethodDeclaration.prototype = Object.create(ConcreteMethodDeclaration.prototype);
SetterMethodDeclaration.prototype.contructor = SetterMethodDeclaration;

SetterMethodDeclaration.prototype.toODialect = function(writer) {
    writer.append("setter ");
    writer.append(this.name);
    writer.append(" {\n");
    writer.indent();
    this.statements.toDialect(writer);
    writer.dedent();
    writer.append("}\n");
}

SetterMethodDeclaration.prototype.toEDialect = function(writer) {
    writer.append("define ");
    writer.append(this.name);
    writer.append(" as setter doing:\n");
    writer.indent();
    this.statements.toDialect(writer);
    writer.dedent();
}

SetterMethodDeclaration.prototype.toMDialect = function(writer) {
    writer.append("def ");
    writer.append(this.name);
    writer.append(" setter():\n");
    writer.indent();
    this.statements.toDialect(writer);
    writer.dedent();
}

exports.SetterMethodDeclaration = SetterMethodDeclaration;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy