def rule_param_SA(parser, node, children):
    if len(children) > 1:
        param_name, param_value = children
    else:
        param_name = children[0]
        param_value = True
        if param_name.startswith('no'):
            param_name = param_name[2:]
            param_value = False

    if parser.debug:
        parser.dprint("TextX rule param: {}, {}".format(param_name,
                                                        param_value))

    return {param_name: param_value}
dataset/ETHPy150Open igordejanovic/textX/textx/textx.py/rule_param_SA/original