Tests a token, sets the pointer to the next one and returns it or throws a syntax error.
Token|null The next token if the condition is true, null otherwise
public function nextIf($primary, $secondary = null) { return $this->tokens[$this->current] ->test($primary, $secondary) ? $this->next() : null; }