src/Behat/Gherkin/Parser.php
protected function parseLanguage()
    {
        $token = $this->expectTokenType('Language');

        if (null === $this->languageSpecifierLine) {
            $this->lexer->analyse($this->input, $token['value']);
            $this->languageSpecifierLine = $token['line'];
        } elseif ($token['line'] !== $this->languageSpecifierLine) {
            throw new ParserException(sprintf(
                'Ambiguous language specifiers on lines: %d and %d%s',
                $this->languageSpecifierLine,
                $token['line'],
                $this->file ? ' in file: ' . $this->file : ''
            ));
        }

        return $this->parseExpression();
    }
protected function parseLanguage()
    {
        $token = $this->expectTokenType('Language');

        if (null === $this->languageSpecifierLine) {
            $this->lexer->analyse($this->input, $token['value']);
            $this->languageSpecifierLine = $token['line'];
        } elseif ($token['line'] !== $this->languageSpecifierLine) {
            throw new ParserException(sprintf(
                'Ambiguous language specifiers on lines: %d and %d%s',
                $this->languageSpecifierLine,
                $token['line'],
                $this->file ? ' in file: ' . $this->file : ''
            ));
        }

        return $this->parseExpression();
    }
protected function parseLanguage ( ) { $ token = $ this -> expectTokenType ( 'Language' ) ; if ( null === $ this -> languageSpecifierLine ) { $ this -> lexer -> analyse ( $ this -> input , $ token [ 'value' ] ) ; $ this -> languageSpecifierLine = $ token [ 'line' ] ; } elseif ( $ token [ 'line' ] !== $ this -> languageSpecifierLine ) { throw new ParserException ( sprintf ( 'Ambiguous language specifiers on lines: %d and %d%s' , $ this -> languageSpecifierLine , $ token [ 'line' ] , $ this -> file ? ' in file: ' . $ this -> file : '' ) ) ; } return $ this -> parseExpression ( ) ; }
Parses language block and updates lexer configuration based on it.

@return BackgroundNode|FeatureNode|OutlineNode|ScenarioNode|StepNode|TableNode|string

@throws ParserException
Parses language block and updates lexer configuration based on it .