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

js.prompto.literal.NullLiteral.js Maven / Gradle / Ivy

var NullType = require("../type/NullType").NullType;
var NullValue = require("../value/NullValue").NullValue;

function NullLiteral() {
   return this;
}

NullLiteral.instance = new NullLiteral();

NullLiteral.prototype.check = function(context) {
    return NullType.instance;
};

NullLiteral.prototype.interpret = function(context) {
    return NullValue.instance;
};

NullLiteral.prototype.toDialect = function(writer) {
    writer.toDialect(this);
};

NullLiteral.prototype.toEDialect = function(writer) {
    writer.append("nothing");
};

NullLiteral.prototype.toODialect = function(writer)
{
    writer.append("null");
};

NullLiteral.prototype.toMDialect = function(writer)
{
    writer.append("None");
}

exports.NullLiteral = NullLiteral;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy