"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoopHandler = void 0;
const types_1 = require("../types");
class LoopHandler {
    constructor(parser) {
        this.parser = parser;
    }
    parseStatement() {
        if (this.parser.match(types_1.TokenType.ТО)) {
            return this.parser.whileStatement();
        }
        if (this.parser.match(types_1.TokenType.БАРОИ)) {
            return this.parser.forStatement();
        }
        return null;
    }
}
exports.LoopHandler = LoopHandler;
//# sourceMappingURL=loop-handler.js.map