@Override
    public Type parseType() throws IOException {
        Type t = new Type();

        switch (curToken.type) {
            case INT:
                curToken = lexer.getToken();
                t.setType(Type.PossibleType.INT);
                break;
            case DOUBLE:
                curToken = lexer.getToken();
                t.setType(Type.PossibleType.DOUBLE);
                break;
            case VOID:
                curToken = lexer.getToken();
                t.setType(Type.PossibleType.VOID);
                break;
            default:
                throw new IOException("type expected");
        }
        return t;
    }