public function fixed(array $fixed): self
    {
        if (!$fixed) {
            return $this;
        }

        $new_fixed = $this->addNamedTokens($this->fixed, $fixed, 'fixed');

        $copy = clone $this;
        $copy->fixed = $new_fixed;
        return $copy;
    }
public function fixed(array $fixed): self
    {
        if (!$fixed) {
            return $this;
        }

        $new_fixed = $this->addNamedTokens($this->fixed, $fixed, 'fixed');

        $copy = clone $this;
        $copy->fixed = $new_fixed;
        return $copy;
    }
public function fixed ( array $ fixed ) : self { if ( ! $ fixed ) { return $ this ; } $ new_fixed = $ this -> addNamedTokens ( $ this -> fixed , $ fixed , 'fixed' ) ; $ copy = clone $ this ; $ copy -> fixed = $ new_fixed ; return $ copy ; }
Create new Lexer extending this one with fixed tokens

Named tokens defined with fixed strings to parse as is.

> Note: Returned object can be the same one in case of empty additions.
@param string[] $fixed Additional fixed tokens. Duplicating names are restricted.
@return static
@throws \InvalidArgumentException In case of name duplication.
@since 1.5.0
Create new Lexer extending this one with fixed tokens