Tale\Jade\Parser::expectEnd PHP Method

expectEnd() protected method

This states that "a line of instructions should end here" Notice that if the next token is _not_ a newLine, it gets handled through handleToken automatically
protected expectEnd ( array $relatedToken = null )
$relatedToken array the token to relate the exception to
    protected function expectEnd(array $relatedToken = null)
    {
        foreach ($this->lookUpNext(['newLine']) as $token) {
            $this->handleToken($token);
            return;
        }
        if (!$this->expectNext(['newLine'])) {
            $this->throwException("Nothing should be following this statement, the end of line is expected.", $relatedToken);
        } else {
            $this->handleToken();
        }
    }