PhpPeg\TokenOption::match_code PHP Method

match_code() public method

public match_code ( )
    function match_code()
    {
        $id = $this->varid();
        $code = PHPBuilder::build()->l($this->save($id));
        foreach ($this->value as $opt) {
            $code->l($opt->compile()->replace(['MATCH' => 'MBREAK', 'FAIL' => NULL]), $this->restore($id));
        }
        $code->l('FBREAK');
        return $this->match_fail_block($code);
    }