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

js.prompto.statement.BreakStatement.js Maven / Gradle / Ivy

var SimpleStatement = require("./SimpleStatement").SimpleStatement;
var BreakResult = require("../runtime/BreakResult").BreakResult;
var VoidType = require("../type/VoidType").VoidType;

function BreakStatement() {
	SimpleStatement.call(this);
	return this;
}

BreakStatement.prototype = Object.create(SimpleStatement.prototype);
BreakStatement.prototype.constructor = BreakStatement;

BreakStatement.prototype.toString = function() {
	return "break"
}

BreakStatement.prototype.toDialect = function(writer) {
    writer.append("break");
};


BreakStatement.prototype.equals = function(obj) {
	return (obj instanceof BreakStatement);
};

BreakStatement.prototype.check = function(context) {
	return VoidType.instance;
};

BreakStatement.prototype.interpret= function(context) {
    return BreakResult.instance;
};

exports.BreakStatement = BreakStatement;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy