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

js.prompto.grammar.Operator.js Maven / Gradle / Ivy

function Operator(name, token) {
    this.name = name;
    this.token = token;
    return this;
}

Operator.prototype.toString = function() {
    return this.token;
};

Operator.prototype.toDialect = function(writer) {
    writer.append(this.token);
};

Operator.PLUS = new Operator("PLUS", "+");
Operator.MINUS = new Operator("MINUS", "-");
Operator.MULTIPLY = new Operator("MULTIPLY", "*");
Operator.DIVIDE = new Operator("DIVIDE", "/");
Operator.IDIVIDE = new Operator("IDIVIDE", "\\");
Operator.MODULO = new Operator("MODULO", "%");

exports.Operator = Operator;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy