summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibRegex/RegexBytecodeStreamOptimizer.h
blob: 373577e458c81b53dc7a987d0241c7b5890603cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include "Forward.h"
#include <AK/Vector.h>

namespace regex {

class Optimizer {
public:
    static void append_alternation(ByteCode& target, ByteCode&& left, ByteCode&& right);
    static void append_character_class(ByteCode& target, Vector<CompareTypeAndValuePair>&& pairs);
};

}