public static function get($objs)
    {
        $ret = [];

        foreach ($objs as $obj) {
            if ($obj instanceof Lexer) {
                foreach ($obj->errors as $err) {
                    $ret[] = [
                        $err->getMessage(),
                        $err->getCode(),
                        $err->ch,
                        $err->pos,
                    ];
                }
            } elseif ($obj instanceof Parser) {
                foreach ($obj->errors as $err) {
                    $ret[] = [
                        $err->getMessage(),
                        $err->getCode(),
                        $err->token->token,
                        $err->token->position,
                    ];
                }
            }
        }

        return $ret;
    }
public static function get($objs)
    {
        $ret = [];

        foreach ($objs as $obj) {
            if ($obj instanceof Lexer) {
                foreach ($obj->errors as $err) {
                    $ret[] = [
                        $err->getMessage(),
                        $err->getCode(),
                        $err->ch,
                        $err->pos,
                    ];
                }
            } elseif ($obj instanceof Parser) {
                foreach ($obj->errors as $err) {
                    $ret[] = [
                        $err->getMessage(),
                        $err->getCode(),
                        $err->token->token,
                        $err->token->position,
                    ];
                }
            }
        }

        return $ret;
    }
public static function get ( $ objs ) { $ ret = [ ] ; foreach ( $ objs as $ obj ) { if ( $ obj instanceof Lexer ) { foreach ( $ obj -> errors as $ err ) { $ ret [ ] = [ $ err -> getMessage ( ) , $ err -> getCode ( ) , $ err -> ch , $ err -> pos , ] ; } } elseif ( $ obj instanceof Parser ) { foreach ( $ obj -> errors as $ err ) { $ ret [ ] = [ $ err -> getMessage ( ) , $ err -> getCode ( ) , $ err -> token -> token , $ err -> token -> position , ] ; } } } return $ ret ; }
Gets the errors of a lexer and a parser.

@param array $objs objects from where the errors will be extracted

@return array Each element of the array represents an error.
`$err[0]` holds the error message.
`$err[1]` holds the error code.
`$err[2]` holds the string that caused the issue.
`$err[3]` holds the position of the string.
(i.e. `array($msg, $code, $str, $pos)`)
Gets the errors of a lexer and a parser .