12 lines
287 B
JavaScript
12 lines
287 B
JavaScript
|
function Token(text, type) {
|
||
|
this.text = text;
|
||
|
this.type = type;
|
||
|
}
|
||
|
|
||
|
Token.prototype.getText = function () { return this.text; };
|
||
|
|
||
|
Token.prototype.getType = function () { return this.type; };
|
||
|
|
||
|
Token.prototype.toString = function () {
|
||
|
return this.type + " " + this.text;
|
||
|
};
|