module

KemalWAF::OperatorDispatch

============================================================================= Branchless Operator Dispatch

Jump-table pattern for operator matching - eliminates branching in hotpath Each operator has a fixed index, dispatch is O(1) array lookup

Constants

OPERATOR_INDEX = {"regex" => OperatorType::Regex, "contains" => OperatorType::Contains, "starts_with" => OperatorType::StartsWith, "ends_with" => OperatorType::EndsWith, "equals" => OperatorType::Equals, "libinjection_sqli" => OperatorType::LibInjectionSqli, "libinjection_xss" => OperatorType::LibInjectionXss}

Operator string to index mapping (compile-time constant)

Class methods

to_index(operator : String | Nil) : OperatorType

Convert operator string to index (with default)

Source