@staticmethod
def _get_options(ctx):
    """
        Returns the option of an command.

        :param ParserRuleContext ctx: The parse tree with the options.

        :rtype: dict[str,str]
        """
    options = {}
    i = 0
    while True:
        name_token = ctx.OPT_ARG_NAME(i)
        value_token = ctx.OPT_ARG_VALUE(i)
        if not name_token:
            break
        option_name = name_token.getText()
        option_value = value_token.getText()
        if option_value[0] == '"' and option_value[-1] == '"' or option_value[0
            ] == "'" and option_value[-1] == "'":
            option_value = option_value[1:-1]
        options[option_name] = option_value
        i += 1
    return options
