name:
dist/Parser/ReductionPair.js
-rw-r--r--
871
1"use strict";
2exports.__esModule = true;
3/**
4 * Represents the length to reduce the stack by, and the replacement symbol that will replace those tokens in the stack.
5 */
6var ReductionPair = /** @class */ (function () {
7 function ReductionPair(replacementSymbol, length) {
8 this.lengthToReduceStackBy = length;
9 this.replacementSymbol = replacementSymbol;
10 }
11 /**
12 * Get the number representing the length to reduce the stack by.
13 * @returns {number}
14 */
15 ReductionPair.prototype.getLengthToReduceStackBy = function () {
16 return this.lengthToReduceStackBy;
17 };
18 /**
19 * Get the replacement token index.
20 * @returns {number}
21 */
22 ReductionPair.prototype.getReplacementSymbol = function () {
23 return this.replacementSymbol;
24 };
25 return ReductionPair;
26}());
27exports.ReductionPair = ReductionPair;